Skip to content

Publish Release

Publish Release #10

name: Publish Release
on:
workflow_dispatch:
jobs:
publish_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- uses: release-drafter/release-drafter@v5
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: bump version
run: npm version "${{ steps.release_drafter.outputs.tag_name }}" --git-tag-version false
- name: publish to npm
run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: push version
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add .
git commit -m ":bookmark: version bump"
git push
- uses: release-drafter/release-drafter@v5
id: release_drafter_publish
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}