Skip to content

ci: add release workflow #8

ci: add release workflow

ci: add release workflow #8

Workflow file for this run

name: Release
on:
push:
branches:
- main
env:
NODE_VERSION: '20'
PNPM_VERSION: '8'
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Release
id: release
uses: google-github-actions/release-please-action@v3
with:
release-type: node
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v3
with:
ref: ${{ steps.release.outputs.tag_name }}
- name: Setup Pnpm
if: ${{ steps.release.outputs.release_created }}
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Node Dependencies
if: ${{ steps.release.outputs.release_created }}
run: pnpm install
- name: Bundle
if: ${{ steps.release.outputs.release_created }}
run: pnpm run bundle
- name: Publish
if: ${{ steps.release.outputs.release_created }}
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}