Skip to content

Commit

Permalink
actions: rewrite with matrix, run on version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ariscript committed Jan 3, 2022
1 parent c296e0d commit 956963c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 63 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,13 @@ name: Build
on: workflow_dispatch

jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 16
- name: install yarn
run: npm i -g yarn
- name: install dependencies
run: yarn
- name: build
run: yarn make
build:
runs-on: ${{ matrix.os }}

build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 16
- name: install yarn
run: npm i -g yarn
- name: install dependencies
run: yarn
- name: build
run: yarn make
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
Expand Down
43 changes: 8 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,17 @@
name: Release
on:
release:
types:
- created
push:
tags:
- "v*"

jobs:
publish_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 16
- name: install yarn
run: npm i -g yarn
- name: install dependencies
run: yarn
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn publish
release:
runs-on: ${{ matrix.os }}

publish_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 16
- name: install yarn
run: npm i -g yarn
- name: install dependencies
run: yarn
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn publish
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

publish_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
Expand Down

0 comments on commit 956963c

Please sign in to comment.