Skip to content

Commit

Permalink
Create release.yml (google#7605)
Browse files Browse the repository at this point in the history
Create a new `release.yml` for defining automatic publishing to package managers on releases.

Adds the NPM publishing steps as it is the most straightforward.
  • Loading branch information
dbaileychess authored and Jochen Parmentier committed Oct 29, 2024
1 parent 247ad4a commit 36670cb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
permissions: read-all

on:
# For manual tests.
workflow_dispatch:
release:
types: [created]

jobs:
publish-npm:
name: Publish NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOEKN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 36670cb

Please sign in to comment.