Skip to content

Commit

Permalink
fix(ci): fix the release workflows for the stable release (rome#3583)
Browse files Browse the repository at this point in the history
  • Loading branch information
leops authored Nov 8, 2022
1 parent a6a1d8b commit 211540d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ jobs:
run: |
echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"
echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
- name: Set version name
if: steps.version.outputs.changed != 'true'
run: |
echo "version=$(node npm/rome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV
- name: Check prerelease status
id: prerelease
- name: Set prerelease status
if: env.nightly == 'true'
env:
prerelease: true
run: echo "Create pre-release"
run: |
echo "prerelease=true" >> $GITHUB_ENV
echo "version=$(node npm/rome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV
build:
strategy:
Expand Down Expand Up @@ -201,8 +196,8 @@ jobs:
- name: Generate npm packages
run: node npm/rome/scripts/generate-packages.mjs

- name: Publish npm packages as next
run: for package in npm/*; do if [ $package != "npm/js-api" ]; then npm publish $package --tag next --access public; fi; done
- name: Publish npm packages as latest
run: for package in npm/*; do if [ $package != "npm/js-api" ]; then npm publish $package --tag latest --access public; fi; done
if: needs.build.outputs.prerelease != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ jobs:
run: node npm/js-api/scripts/update-nightly-version.mjs

- name: Publish npm package as latest
run: npm publish @rometools/js-api --tag latest --access public
run: npm publish npm/js-api --tag latest --access public
if: needs.build.outputs.prerelease != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish npm package as nightly
run: npm publish @rometools/js-api --tag nightly --access public
run: npm publish npm/js-api --tag nightly --access public
if: needs.build.outputs.prerelease == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit 211540d

Please sign in to comment.