From 36670cb0f9155d6a9ddbe9b71c3960b30147c726 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Wed, 26 Oct 2022 00:30:16 -0700 Subject: [PATCH] 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. --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..a9eb385f65f --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}