From 2b3a64dca2d8ae602a01d501023ce53f5a2fcb10 Mon Sep 17 00:00:00 2001 From: Maciej Winnicki Date: Mon, 3 Feb 2020 13:19:23 +0100 Subject: [PATCH] Fix publish step --- .github/workflows/push.yml | 7 ++++--- RELEASING.md | 12 +++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0cc4424..2262f43 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -12,7 +12,8 @@ jobs: - run: npm install - run: npm test - run: npm run lint - - run: npm publish --@mthenw:registry=https://registry.npmjs.org/ - if: startsWith(github.event.ref, 'refs/tags') + - uses: primer/publish@master env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + NPM_REGISTRY_URL: registry.npmjs.org diff --git a/RELEASING.md b/RELEASING.md index 348cf24..7e60c8a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -18,19 +18,13 @@ After all [pull requests](https://github.com/mthenw/frontail/pulls) for a releas $ git commit -am "Release " ``` -1. Tag the version. +1. Push the commit. ```sh - $ git tag v + $ git push origin head ``` -1. Push the commit and tag. - - ```sh - $ git push origin head --tags - ``` - -1. Travis CI will publish new version to NPM. +1. GitHub action will publish new version to NPM and push new tag. 1. Publish new release on GitHub with [`release`](https://github.com/zeit/release) package.