Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CD artifact download #378

Merged
merged 11 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/deploy-ccd-js-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,11 @@ jobs:
with:
name: build-release
path: |
packages/sdk/lib
packages/sdk/src
packages/ccd-js-gen/lib
packages/ccd-js-gen/src
packages/ccd-js-gen/bin
packages/rust-bindings/lib
packages/*/package.json
packages/*/README.md
packages/ccd-js-gen/package.json
packages/ccd-js-gen/README.md

upload-release:
needs: build
Expand All @@ -110,7 +107,7 @@ jobs:
- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages
path: packages/ccd-js-gen
name: build-release

- uses: actions/setup-node@v3
Expand All @@ -119,16 +116,12 @@ jobs:
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Setup .yarnrc.yml
- name: Publish to NPM
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/ccd-js-gen npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'

- name: Publish to NPM
run: yarn workspace @concordium/ccd-js-gen npm publish --access public
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

- name: Create a GitHub release
uses: ncipollo/release-action@v1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/deploy-react-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages
path: packages/react-components
soerenbf marked this conversation as resolved.
Show resolved Hide resolved
name: build-release

- uses: actions/setup-node@v3
Expand All @@ -115,16 +115,12 @@ jobs:
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Setup .yarnrc.yml
- name: Publish to NPM
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/react-components npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'

- name: Publish to NPM
run: yarn workspace @concordium/react-components npm publish --access public
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

- name: Create a GitHub release
uses: ncipollo/release-action@v1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/deploy-rust-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages
path: packages/rust-bindings
name: build-release

- name: Create a GitHub release
Expand All @@ -121,13 +121,9 @@ jobs:
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Setup .yarnrc.yml
- name: Publish to NPM
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/rust-bindings npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'

- name: Publish to NPM
run: yarn workspace @concordium/rust-bindings npm publish --access public
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'
112 changes: 38 additions & 74 deletions .github/workflows/deploy-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,86 +74,25 @@ jobs:
- name: Build release
run: yarn build:all

- name: Generate typedoc documentation
run: yarn build:docs

- name: Store build-release
uses: actions/upload-artifact@v4
with:
name: build-release
path: |
packages/sdk/lib
packages/sdk/src
packages/ccd-js-gen/lib
packages/ccd-js-gen/src
packages/ccd-js-gen/bin
packages/rust-bindings/lib
packages/*/package.json
packages/*/README.md

build-typedoc:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v3

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

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

- name: Restore cached dependencies
uses: actions/cache/restore@v3
with:
path: |
./node_modules
./docs/node_modules
./packages/*/node_modules
./examples/**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Generate typedoc documentation
run: yarn build:docs
packages/sdk/package.json
packages/sdk/README.md

- name: Store typedoc
uses: actions/upload-artifact@v4
with:
name: typedoc-build
path: typedoc

deploy-typedoc:
needs:
- build-typedoc
- upload-release
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get typedoc
uses: actions/download-artifact@v4
with:
path: typedoc
name: typedoc-build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload GH pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: './typedoc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

upload-release:
needs: build
runs-on: ubuntu-latest
Expand All @@ -176,7 +115,7 @@ jobs:
- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages
path: packages/sdk
name: build-release

- uses: actions/setup-node@v3
Expand All @@ -185,20 +124,45 @@ jobs:
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Setup .yarnrc.yml
- name: Publish to NPM
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/web-sdk npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'

- name: Publish to NPM
run: yarn workspace @concordium/web-sdk npm publish --access public
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

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

deploy-typedoc:
needs:
- upload-release
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get typedoc
uses: actions/download-artifact@v4
with:
path: typedoc
name: typedoc-build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload GH pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: './typedoc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
12 changes: 4 additions & 8 deletions .github/workflows/deploy-wallet-connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Get build-output
uses: actions/download-artifact@v4
with:
path: packages
path: packages/wallet-connectors
name: build-release

- uses: actions/setup-node@v3
Expand All @@ -115,16 +115,12 @@ jobs:
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Setup .yarnrc.yml
- name: Publish to NPM
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn workspace @concordium/wallet-connectors npm publish
env:
NPM_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'

- name: Publish to NPM
run: yarn workspace @concordium/wallet-connectors npm publish --access public
NPM_AUTH_TOKEN: '${{secrets.NPM_PUBLISH_TOKEN}}'

- name: Create a GitHub release
uses: ncipollo/release-action@v1
Expand Down
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ plugins:
yarnPath: .yarn/releases/yarn-berry.cjs

enableMessageNames: false

# publishing
npmPublishAccess: 'public'
npmPublishRegistry: 'https://registry.npmjs.org'
# npmAuthToken is set in CD pipeline
2 changes: 1 addition & 1 deletion packages/ccd-js-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@concordium/web-sdk": "7.x"
},
"dependencies": {
"@concordium/web-sdk": "^7.0.0",
"@concordium/web-sdk": "workspace:^7.0.0",
"buffer": "^6.0.3",
"commander": "^11.0.0",
"sanitize-filename": "^1.6.3",
Expand Down
5 changes: 1 addition & 4 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"./dist",
"./src"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/Concordium/concordium-node-sdk-js/tree/main/packages/react-components"
Expand All @@ -32,7 +29,7 @@
"build": "tsc"
},
"dependencies": {
"@concordium/wallet-connectors": "^0.6.0",
"@concordium/wallet-connectors": "workspace:^",
"@protobuf-ts/grpcweb-transport": "^2.9.4",
"buffer": "^6.0.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"clean": "rimraf -- lib src/grpc-api"
},
"dependencies": {
"@concordium/rust-bindings": "^3.1.0",
"@concordium/rust-bindings": "workspace:^",
"@grpc/grpc-js": "^1.9.4",
"@noble/ed25519": "^2.0.0",
"@noble/hashes": "^1.3.2",
Expand Down
3 changes: 0 additions & 3 deletions packages/wallet-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"./dist",
"./src"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/Concordium/concordium-node-sdk-js/tree/main/packages/wallet-connectors"
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3565,7 +3565,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@concordium/ccd-js-gen@workspace:packages/ccd-js-gen"
dependencies:
"@concordium/web-sdk": ^7.0.0
"@concordium/web-sdk": "workspace:^7.0.0"
"@types/jest": ^26.0.23
"@types/node": ^20.5.0
buffer: ^6.0.3
Expand Down Expand Up @@ -3632,7 +3632,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@concordium/react-components@workspace:packages/react-components"
dependencies:
"@concordium/wallet-connectors": ^0.6.0
"@concordium/wallet-connectors": "workspace:^"
"@protobuf-ts/grpcweb-transport": ^2.9.4
"@tsconfig/recommended": ^1.0.1
"@types/node": ^18.11.17
Expand All @@ -3647,7 +3647,7 @@ __metadata:
languageName: unknown
linkType: soft

"@concordium/rust-bindings@^3.1.0, @concordium/rust-bindings@workspace:packages/rust-bindings":
"@concordium/rust-bindings@workspace:^, @concordium/rust-bindings@workspace:packages/rust-bindings":
version: 0.0.0-use.local
resolution: "@concordium/rust-bindings@workspace:packages/rust-bindings"
dependencies:
Expand All @@ -3668,7 +3668,7 @@ __metadata:
languageName: unknown
linkType: soft

"@concordium/wallet-connectors@^0.6.0, @concordium/wallet-connectors@workspace:packages/wallet-connectors":
"@concordium/wallet-connectors@workspace:^, @concordium/wallet-connectors@workspace:packages/wallet-connectors":
version: 0.0.0-use.local
resolution: "@concordium/wallet-connectors@workspace:packages/wallet-connectors"
dependencies:
Expand All @@ -3695,11 +3695,11 @@ __metadata:
languageName: unknown
linkType: soft

"@concordium/web-sdk@^7.0.0, @concordium/web-sdk@workspace:^, @concordium/web-sdk@workspace:packages/sdk":
"@concordium/web-sdk@workspace:^, @concordium/web-sdk@workspace:^7.0.0, @concordium/web-sdk@workspace:packages/sdk":
version: 0.0.0-use.local
resolution: "@concordium/web-sdk@workspace:packages/sdk"
dependencies:
"@concordium/rust-bindings": ^3.1.0
"@concordium/rust-bindings": "workspace:^"
"@grpc/grpc-js": ^1.9.4
"@noble/ed25519": ^2.0.0
"@noble/hashes": ^1.3.2
Expand Down
Loading