Skip to content

Commit

Permalink
Merge pull request #273 from remarkablemark/ci/release
Browse files Browse the repository at this point in the history
ci(github): add workflow `release.yml`
  • Loading branch information
remarkablemark committed Sep 6, 2021
2 parents 2d7d332 + 9e25898 commit 8431bf4
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,45 @@
name: release
on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}

steps:
- name: Read package name
run: echo ::set-output name=NAME::$(jq -r .name package.json)
id: package

- name: Release Please
id: release
uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: ${{ steps.package.outputs.NAME }}

publish:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 8431bf4

Please sign in to comment.