Skip to content

Commit

Permalink
build: Enable release-please workflow for release, fixes #636 (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa authored Oct 27, 2024
1 parent f892165 commit 5e9a857
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Relevent docs:
# - https://github.com/googleapis/release-please
# - https://github.com/googleapis/release-please-action

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.UUID_RELEASE_PLEASE_TOKEN }}
release-type: node

# Steps below handle publication to NPM

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

- run: npm ci
if: ${{ steps.release.outputs.release_created }}

- run: npm test
if: ${{ steps.release.outputs.release_created }}

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.UUID_NPM_RELEASE_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 5e9a857

Please sign in to comment.