Skip to content

Commit

Permalink
Changed order to fix the publish pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
allancassaro committed Nov 20, 2023
1 parent 884a8e0 commit 86b2072
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,21 @@ jobs:
new_version="${major}.${minor}.${patch}"
echo "New release is ${new_version}"
echo "new_version=${new_version}" >> "$GITHUB_OUTPUT"
git pull --rebase
npm version --no-git-tag-version --allow-same-version $new_version || exit 0
- name: Publish the package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public

- name: Commit the changes
continue-on-error: true
run: |
env:
new_version: ${{ steps.set_new_version.outputs.new_version }}
run: |
git reset --hard
git config --global user.email 'github-ci@boldcommerce.com'
git config --global user.name 'bold-github-ci'
npm version --no-git-tag-version --allow-same-version $new_version || exit 0
git add package.json package-lock.json
git commit -m 'Bump version number for release' || exit 0
git push origin || exit 0
Expand All @@ -84,8 +91,4 @@ jobs:
env:
new_version: ${{ steps.set_new_version.outputs.new_version }}
run: |
gh release create ${new_version} --generate-notes --latest
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
gh release create ${new_version} --generate-notes --latest

0 comments on commit 86b2072

Please sign in to comment.