48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Release
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
validate:
|
|
uses: './.github/workflows/validate.yml'
|
|
|
|
publish:
|
|
runs-on: ubuntu-22.04
|
|
needs:
|
|
- validate
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Bump and Tag
|
|
run: |
|
|
git config user.email "github-actions@users.noreply.github.com"
|
|
git config user.name "GitHub Actions"
|
|
pnpx changelogen@latest --release
|
|
git push
|
|
git push --tags
|
|
|
|
- name: NPM
|
|
run: |
|
|
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
|
|
pnpm publish
|
|
|
|
- name: GitHub Release
|
|
run: pnpx changelogen@latest gh release --token ${{ secrets.GITHUB_TOKEN }}
|