From c40cd7c9f47bb6c6bb14ad6e556247485c0c41be Mon Sep 17 00:00:00 2001 From: Tobias Looker Date: Mon, 4 May 2020 16:10:49 +1200 Subject: [PATCH] ci: update push-release workflow (#107) --- .github/workflows/push-release.yml | 37 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/push-release.yml b/.github/workflows/push-release.yml index 24f8d50..49c209a 100644 --- a/.github/workflows/push-release.yml +++ b/.github/workflows/push-release.yml @@ -6,13 +6,14 @@ on: - master jobs: - build_test_publish: - name: Build, test, and publish release + build_pub_binaries: + name: Publish binaries for supported environments for release if: "contains(github.event.head_commit.message, 'chore(release): publish')" - runs-on: ubuntu-latest + runs-on: ${{matrix.os}} strategy: matrix: node-version: [10.x, 11.x, 12.x] + os: [windows-latest, macos-latest, ubuntu-latest] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 @@ -20,25 +21,19 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn - run: yarn install --frozen-lockfile - - run: yarn lint - run: yarn build - run: yarn test - - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc 2> /dev/null + - run: yarn publish:binary env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} - - run: git config user.name "Mattr CI" - - run: git config user.email "npmjs_ci_mattr_public@mattr.global" - - run: yarn publish:ts - build_pub_binaries: - name: Publish binaries for supported environments for release + NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build_test_publish: + name: Build, test, and publish release if: "contains(github.event.head_commit.message, 'chore(release): publish')" - needs: build_test_publish - runs-on: ${{matrix.os}} + needs: build_pub_binaries + runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 11.x, 12.x] - os: [windows-latest, macos-latest, ubuntu-latest] + node-version: [10.x] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 @@ -46,7 +41,13 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn - run: yarn install --frozen-lockfile + - run: yarn lint - run: yarn build - - run: yarn publish:binary + - run: yarn test + - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc 2> /dev/null env: - NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} + - run: git config user.name "Mattr CI" + - run: git config user.email "npmjs_ci_mattr_public@mattr.global" + - run: yarn publish:ts