Skip to content

Publish

Publish #19

Workflow file for this run

name: Publish
on: [workflow_dispatch]
jobs:
verify:
uses: ./.github/workflows/verify.yml
secrets: inherit
publish:
name: Bump & Publish
runs-on: ubuntu-22.04
needs: ['verify']
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # Grab the entire history
- uses: pnpm/[email protected]
name: Install PNPM
with:
version: 8
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 18
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Create Changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
output-file: 'false'
fallback-version: '1.0.0'
- name: Publish to NPM
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
pnpm publish
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
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 }}