0.1.11 #56
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, workflow_dispatch] | |
jobs: | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: https://registry.npmjs.org | |
- name: Install deps | |
run: yarn install --frozen-lockfile | |
- name: Build package | |
run: yarn build | |
- name: Get tag | |
uses: martinbeentjes/npm-get-version-action@master | |
id: get_tag | |
- name: Get Changelog Entry | |
id: get_changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
validation_depth: 10 | |
version: ${{ steps.get_tag.outputs.current-version }} | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
body: ${{ steps.get_changelog.outputs.changes }} | |
tag: ${{ steps.get_changelog.outputs.version }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |