Release #11
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: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
environment: npm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Run Unit Tests | |
run: | | |
npm install | |
npm run lint | |
npm run test | |
- name: get-version | |
id: package-version | |
uses: martinbeentjes/[email protected] | |
- name: Parse changelog | |
id: parse-changelog | |
uses: schwma/[email protected] | |
with: | |
version: '${{ steps.package-version.outputs.current-version }}' | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: 'v${{ steps.package-version.outputs.current-version }}' | |
body: '${{ steps.parse-changelog.outputs.body }}' | |
- run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |