-
Notifications
You must be signed in to change notification settings - Fork 10
ci(deserializer): fix npm #451
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7742f52
ci(deserializer): update npm publishing workflow to use new tag input
TartanLeGrand 3dc6a89
ci(deserializer): add build step for SDK in npm publishing workflow
TartanLeGrand 58a4cda
fix: remove tests
TartanLeGrand 2054742
fix: ci artifacts
TartanLeGrand 9d2c0d6
fix: add npm run test:prepare to ci
SeddikBellamine 7ce5af5
fix: use the same workspace
SeddikBellamine 8e12856
fix: build
SeddikBellamine 71c5806
fix: use prepare workspace
SeddikBellamine 430d65e
fix: remove unecessary build steps and use build with the reusable wo…
SeddikBellamine 56dfc22
fix: indentation
SeddikBellamine a98396a
fix: add set-publish-version job to manage versioning for nightly and…
TartanLeGrand f6c72d0
fix: update workflow name for clarity in publish-npm-deserializer
TartanLeGrand ca259d3
fix: update publish-npm workflow reference to version 1.4.0
TartanLeGrand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: Publish Package NPM | ||
| name: Publish Package NPM - Deserializer | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
@@ -10,30 +10,50 @@ on: | |
| options: | ||
| - latest | ||
| - nightly | ||
| - beta | ||
| default: nightly | ||
|
|
||
| jobs: | ||
| set-env: | ||
| set-publish-version: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| resolved-environment: ${{ steps.setenv.outputs.env }} | ||
| steps: | ||
| - id: setenv | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| - name: Set publish version | ||
| id: set-publish-version | ||
| if: github.event.inputs.tag == 'nightly' | ||
| working-directory: packages/sdk | ||
| run: | | ||
| if [ "${{ github.event.inputs.tag }}" = "latest" ]; then | ||
| echo "env=production" >> $GITHUB_OUTPUT | ||
| if [ "${{ github.event.inputs.tag }}" == "nightly" ]; then | ||
| CURRENT_VERSION=$(npm pkg get version | tr -d '"') | ||
| NIGHTLY_VERSION="${CURRENT_VERSION}-nightly-${GITHUB_SHA::7}" | ||
| echo "VERSION=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "env=staging" >> $GITHUB_OUTPUT | ||
| echo "VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT | ||
| fi | ||
| outputs: | ||
| VERSION: ${{ steps.set-publish-version.outputs.VERSION }} | ||
|
|
||
| publish-npm: | ||
| needs: set-env | ||
| uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-[email protected] | ||
| uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected] | ||
| needs: set-publish-version | ||
| with: | ||
| scope: '@iexec/deserializer' | ||
| registry: 'https://registry.npmjs.org' | ||
| node-version: '18' | ||
| environment: ${{ needs.set-env.outputs.resolved-environment }} | ||
| tag: ${{ github.event.inputs.tag }} | ||
| environment: production | ||
| working-directory: "packages/dataprotector-deserializer" | ||
| version: ${{ needs.set-publish-version.outputs.VERSION }} | ||
| install-command: | | ||
| npm ci | ||
| cd ../sdk | ||
| npm ci | ||
| npm run codegen | ||
| npm run build | ||
| cd ../dataprotector-deserializer | ||
| npm run test:prepare | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we need this ? |
||
| secrets: | ||
| npm-token: ${{ secrets.NPM_TOKEN }} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/iExecBlockchainComputing/github-actions-workflows/pull/62/files#diff-f089b0e55b389f533faf1e65e3cb93b0bcd97b391c32f28449d08fd4f0512447R92
have make this for get the artifacts from the other build job