Skip to content

Commit

Permalink
Merge branch 'main' into release/web-sdk/8
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Aug 28, 2024
2 parents a2f852b + 98a2736 commit 18a4bb9
Show file tree
Hide file tree
Showing 392 changed files with 25,169 additions and 11,825 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
27 changes: 4 additions & 23 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,21 @@ module.exports = {
browser: true,
es2020: true,
},
extends: [
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
extends: ['plugin:import/recommended', 'plugin:import/typescript', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [
'./packages/**/tsconfig.json',
'./examples/wallet-connection/*/tsconfig.json',
'./docs/**/tsconfig.json',
'**/tsconfig.eslint.json',
],
},
plugins: ['@typescript-eslint', 'import'],
rules: {
'prettier/prettier': 'warn',
quotes: [
2,
'single',
{
avoidEscape: true,
},
],
'import/no-unresolved': [
2,
{
Expand All @@ -44,7 +32,7 @@ module.exports = {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*/test/*', '**/*.config.*'],
devDependencies: ['**/*/test/*', '**/*.config.*', '**/*/__tests__/*'],
},
],
'@typescript-eslint/no-unused-vars': [
Expand All @@ -63,14 +51,7 @@ module.exports = {
},
},
],
ignorePatterns: [
'**/pkg/**/*',
'**/dist/**/*',
'**/lib/**/*',
'deps/**/*',
'**/src/grpc-api/*',
'typedoc/**',
],
ignorePatterns: ['**/pkg/**/*', '**/dist/**/*', '**/lib/**/*', 'deps/**/*', '**/src/grpc-api/*', 'typedoc/**'],
settings: {
'import/ignore': ['bs58check'],
'import/parsers': {
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /
schedule:
interval: daily
open-pull-requests-limit: 0 # disable non-security upgrades
134 changes: 134 additions & 0 deletions .github/workflows/deploy-ccd-js-gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: Deploy ccd-js-gen

on:
# Run automatically on tag push
push:
tags:
- ccd-js-gen/*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'deploy-ccdjsgen'
cancel-in-progress: false

env:
NODE_VERSION: 18.16.0
RUST_VERSION: 1.73
RUST_FMT: nightly-2023-04-01-x86_64-unknown-linux-gnu

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn

- name: Install rust
run: rustup default ${{ env.RUST_VERSION }}

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
packages/rust-bindings
deps/concordium-base/rust-src
deps/concordium-base/smart-contracts/contracts-common
- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
./node_modules
./docs/node_modules
./packages/*/node_modules
./examples/**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Cache GRPC
id: cache-grpc
uses: actions/cache@v3
with:
path: |
./packages/sdk/src/grpc-api
key: ${{ runner.os }}-grpc-${{ hashFiles('deps/concordium-base/concordium-grpc-api') }}
restore-keys: ${{ runner.os }}-grpc

- name: Get dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build release
run: yarn build:all

- name: Store build-release
uses: actions/upload-artifact@v4
with:
name: build-release
path: |
packages/ccd-js-gen/lib
packages/ccd-js-gen/src
packages/ccd-js-gen/bin
packages/ccd-js-gen/package.json
packages/ccd-js-gen/README.md
upload-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
environment: deploy
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- name: Extract tag name
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/ccd-js-gen/}"

- name: Test that tag version matches package.json version
run: test "${{ steps.get_tag.outputs.tag }}" = "$(jq -r ".version" packages/ccd-js-gen/package.json)" || exit 1

- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages/ccd-js-gen
name: build-release

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Publish to NPM
run: |
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/ccd-js-gen npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ccd-js-gen/v${{ steps.get_tag.outputs.tag_name }}
name: CCD-JS-Gen Release v${{ steps.get_tag.outputs.tag_name }}
draft: true
133 changes: 133 additions & 0 deletions .github/workflows/deploy-react-components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Deploy react-components

on:
# Run automatically on tag push
push:
tags:
- react-components/*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'deploy-ccdjsgen'
cancel-in-progress: false

env:
NODE_VERSION: 18.16.0
RUST_VERSION: 1.73
RUST_FMT: nightly-2023-04-01-x86_64-unknown-linux-gnu

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn

- name: Install rust
run: rustup default ${{ env.RUST_VERSION }}

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
packages/rust-bindings
deps/concordium-base/rust-src
deps/concordium-base/smart-contracts/contracts-common
- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
./node_modules
./docs/node_modules
./packages/*/node_modules
./examples/**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Cache GRPC
id: cache-grpc
uses: actions/cache@v3
with:
path: |
./packages/sdk/src/grpc-api
key: ${{ runner.os }}-grpc-${{ hashFiles('deps/concordium-base/concordium-grpc-api') }}
restore-keys: ${{ runner.os }}-grpc

- name: Get dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build release
run: yarn build:all

- name: Store build-release
uses: actions/upload-artifact@v4
with:
name: build-release
path: |
packages/react-components/dist
packages/react-components/src
packages/react-components/package.json
packages/react-components/README.md
upload-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
environment: deploy
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- name: Extract tag name
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/react-components/}"

- name: Test that tag version matches package.json version
run: test "${{ steps.get_tag.outputs.tag }}" = "$(jq -r ".version" packages/react-components/package.json)" || exit 1

- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages/react-components
name: build-release

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Publish to NPM
run: |
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/react-components npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: react-components/v${{ steps.get_tag.outputs.tag_name }}
name: react-components Release v${{ steps.get_tag.outputs.tag_name }}
draft: true
Loading

0 comments on commit 18a4bb9

Please sign in to comment.