-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add semantic-release to autopublish (#1015)
Closes #1000
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,29 +8,28 @@ on: | |
- '!*' | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
test: | ||
name: Node ${{ matrix.node }} and ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
node: [14, 16, 18] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: ${{ matrix.node }} | ||
check-latest: true | ||
- name: Print Node Version | ||
run: node --version | ||
- name: Install Dependencies | ||
run: yarn install | ||
- name: Build Test Binary | ||
|
@@ -42,3 +41,9 @@ jobs: | |
- name: Coverage | ||
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 # only run once | ||
run: yarn test-coverage | ||
- name: Maybe Release | ||
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} | ||
run: npx [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters