Release #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
token: ${{ secrets.GH_PAT }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- run: npm run build | |
- name: Bump version | |
if: ${{ github.event.release.target_commitish == 'main' }} | |
run: | | |
npm version --no-git-tag-version ${TAG_NAME:1} | |
git config user.name wwilsman | |
git config user.email wil@wilsman.dev | |
git add . | |
git commit --message "🔖 $TAG_NAME" | |
git tag $TAG_NAME | |
git push origin master | |
git push origin refs/tags/$TAG_NAME --force | |
env: | |
TAG_NAME: ${{ github.event.release.tag_name }} | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |