release #30
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: | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Enable Corepack | |
run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies and build | |
run: | | |
yarn install | |
yarn build | |
- name: Install release-it globally | |
run: | | |
npm i -g release-it@17.8.2 | |
npm i -g @release-it/conventional-changelog@8.0.2 | |
- name: git config | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: npm config | |
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | |
- name: Bump version | |
run: npx release-it --increment | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |