Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules
id: cache
uses: actions/cache@v4
with:
path: |
~/.cache
**/node_modules
key: cache-node-modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
cache-node-modules-
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: yarn install
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: yarn install --immutable
- name: Build
shell: bash
run: yarn build
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
github-token: ${{ secrets.github_token }}
skip-on-empty: false
skip-commit: true
pre-changelog-generation: './update-package-json.js'
- name: GIT/NPM config
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
shell: bash
run: npm publish --access public
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}