Skip to content

Commit

Permalink
GitHub Actions: latest-release
Browse files Browse the repository at this point in the history
  • Loading branch information
nemuvski committed Jul 24, 2023
1 parent cf3ae09 commit 96e518c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/latest-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: LatestRelease

on:
# Run a workflow when a release has been released
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
release:
types: [released]

jobs:
latest-release:
# Do not run if the release is a prerelease or draft
# @see https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#release
if: ${{ github.event.release.prerelease == false && github.event.release.draft == false }}

runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: prepack
run: npm run prepack
- name: publish
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: postpack
run: npm run postpack

0 comments on commit 96e518c

Please sign in to comment.