Skip to content

Commit

Permalink
Merge pull request #11 from cerebruminc/lucianbuzzo/npm-publish
Browse files Browse the repository at this point in the history
fix: Use release-please logic to publish to npm
  • Loading branch information
LucianBuzzo authored Oct 3, 2022
2 parents 1b2a720 + 49d6911 commit 72336e8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/conventional-changelog.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/npm-publish.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches:
- master

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: release-please-action
# The logic below handles the npm publication:
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 72336e8

Please sign in to comment.