From fcee3100d1c9f8afed783b3cce960874f9b1df3e Mon Sep 17 00:00:00 2001 From: Ian Purvis Date: Wed, 29 Mar 2023 17:05:42 -0500 Subject: [PATCH] Add release workflow with npm publish --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 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 0000000..2ad119f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: '.node-version' + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run tsc + - run: npm run test + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}