From 541c51499b6c19fc57a0fa3bf3de5a3a1554685c Mon Sep 17 00:00:00 2001 From: Oowazu Nonowazu Date: Fri, 28 May 2021 11:59:23 -0500 Subject: [PATCH] Add workflow to push to npm upon cutting a release with a specific name --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 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..58c2c83 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release +on: + push: + tags: + - 'v*-release' + +jobs: + release: + name: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: '14' + registry-url: 'https://registry.npmjs.org' + + - uses: actions/cache@v2 + id: yarn-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-modules- + - name: Install Dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build + + - name: Upload + run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}