Merge pull request #160 from invopop/fix_display_errors #140
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: | |
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 |