Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: push

permissions:
id-token: write # Required for OIDC
contents: read
contents: write # Required for creating releases and tags

jobs:
test:
Expand Down Expand Up @@ -49,3 +49,23 @@ jobs:
- run: npm install
- name: Publish the library.
run: npm publish $DIST_FOLDER

create_release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs:
- publish_to_npm
steps:
- uses: actions/checkout@v3.3.0
- name: Get version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Create tag and release
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}
gh release create v${{ steps.version.outputs.version }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}