Skip to content

Commit

Permalink
ci: update push-release workflow (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
tplooker authored May 4, 2020
1 parent 069bffc commit c40cd7c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,48 @@ 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
with:
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
with:
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

0 comments on commit c40cd7c

Please sign in to comment.