Skip to content

ci(publish): fix release workflow given the new config already set (#25) #1

ci(publish): fix release workflow given the new config already set (#25)

ci(publish): fix release workflow given the new config already set (#25) #1

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: 🚀 Publish Release
on:
push:
branches:
- 'main'
jobs:
publish:
permissions:
# Needed by googleapis/release-please-action@v4
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: 🍄 Bump package version, create GitHub release, and update changelog
uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
- name: 🚀 Publish to npm
if: ${{ steps.release.outputs.release_created }}
run: |
npm install
npm run build --if-present
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}