From de6208a88aadb536e9b8a141a992bd46e316e87b Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Tue, 3 May 2022 14:06:05 +0200 Subject: [PATCH] Add publish step --- .github/workflows/ci.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6416a745..8ba2ba5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: CI -on: - push: - branches: - - main +on: push jobs: check-format: @@ -31,4 +28,23 @@ jobs: with: node-version: ${{ matrix.node }} - run: npm install - - run: npm run build \ No newline at end of file + - run: npm run build + publish: + name: Publish + needs: + - check-format + - build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODEVERSION }} + cache: "npm" + registry-url: "https://registry.npmjs.org" + - run: npm install + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} + - uses: softprops/action-gh-release@v1 \ No newline at end of file