Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow for releasing and publishing pa…
Browse files Browse the repository at this point in the history
…ckage
  • Loading branch information
teles committed May 18, 2024
1 parent 211ce37 commit d2fd41d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
name: Create Release and Publish to npm
runs-on: ubuntu-latest

permissions:
contents: write
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -28,19 +32,18 @@ jobs:

- name: Bump version and create tag
id: bump_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ''
run: |
NEW_TAG=$(npx standard-version --dry-run | grep "tagging release" | awk '{print $3}')
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.bump_version.outputs.new_tag }}
release_name: Release ${{ steps.bump_version.outputs.new_tag }}
tag_name: ${{ env.NEW_TAG }}
release_name: Release ${{ env.NEW_TAG }}
body: |
Release notes for ${{ steps.bump_version.outputs.new_tag }}
Release notes for ${{ env.NEW_TAG }}
draft: false
prerelease: false
env:
Expand Down

0 comments on commit d2fd41d

Please sign in to comment.