Skip to content

Merge pull request #158 from invopop/v0.200 #139

Merge pull request #158 from invopop/v0.200

Merge pull request #158 from invopop/v0.200 #139

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- run: npm install
- name: Bump version and create git tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
# Skip if `new_tag` != `tag` (means no bump)
- if: ${{ steps.bump_version.new_tag == steps.bump_version.tag }}
run: npm run build:package
# Skip if `new_tag` != `tag` (means no bump)
- if: ${{ steps.bump_version.new_tag == steps.bump_version.tag }}
name: Set NPM version to ${{ steps.bump_version.outputs.new_tag }}
# working-directory: dist
run: npm version --no-git-tag-version ${{ steps.bump_version.outputs.new_tag }}
# Skip if `new_tag` != `tag` (means no bump)
- if: ${{ steps.bump_version.new_tag == steps.bump_version.tag }}
name: Publish to NPM registry
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./package.json
access: public