Create release.yml (#7605)

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.
This commit is contained in:
Derek Bailey
2022-10-26 00:30:16 -07:00
committed by GitHub
parent a54ca1e759
commit cb616e27cb

23
.github/workflows/release.yml vendored Normal file
View File

@@ -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 }}