From 0c58022b9e8b5a3c8b31d114da74eb9d9ad7ba9e Mon Sep 17 00:00:00 2001 From: Sebass van Boxel Date: Mon, 23 Sep 2019 17:19:52 +0200 Subject: [PATCH] chore: Fix publishing to npm registry --- .github/workflows/nodejs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ec12378..904255a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -39,15 +39,20 @@ jobs: release-and-deploy: name: Release to NPM registry - if: github.ref == 'master' needs: [build-and-test, sonarcloud-scan] runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v1 - - name: publish and deploy + - name: publish run: | npm install npm run semantic-release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: deploy + run: | now="npx now --debug --token=$NOW_TOKEN" echo "$ now rm --safe --yes delete-merged-branch" $now rm --safe --yes delete-merged-branch @@ -56,6 +61,6 @@ jobs: echo "$ now alias" $now alias env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NOW_TOKEN: ${{ secrets.NOW_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}