Skip to content

Commit

Permalink
chore: update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianwessel committed Feb 25, 2024
1 parent 9356432 commit 55634b7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/release_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,30 @@ jobs:
./scripts/commitVersion.sh
echo New version:
new_version=$(node -p -e "require('./package.json').version")
git checkout -b "purista_v$new_version"
echo "new_version=$new_version" >> $GITHUB_OUTPUT
id: bump_version
- name: Dry run publish
run: |
npm publish --access public --dry-run --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit version bump
uses: planetscale/[email protected]
with:
commit_message: 'chore: bump ${{ inputs.version }} version to v${{ steps.bump_version.outputs.new_version }}'
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
branch: 'purista_v${{ steps.bump_version.outputs.new_version }}'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Add Tag
run: |
git tag -a "v${{ steps.bump_version.outputs.new_version }}" -m "v${{ steps.bump_version.outputs.new_version }}"
- name: Dry run publish
run: |
npm publish --access public --dry-run --workspaces
git push origin -u purista_v${{ steps.bump_version.outputs.new_version }}
- name: create pull request
run: gh pr create -B master -H purista_v${{ steps.bump_version.outputs.new_version }} --title 'Merge purista_v${{ steps.bump_version.outputs.new_version }} into master' --body 'Created by Github action'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push to origin
run: |
git push origin --tags --follow-tags
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
run: npm publish --access public --workspaces
env:
Expand Down

0 comments on commit 55634b7

Please sign in to comment.