feat: clean up release job #39
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
name: build/release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
include: | |
- os: macos-latest | |
package-path: dist/*.dmg | |
- os: ubuntu-latest | |
package-path: dist/*.deb | |
steps: | |
- name: check out repo | |
uses: actions/checkout@v4 | |
- name: install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: build cctron | |
run: | | |
yarn install | |
yarn build | |
- name: bundle cctron | |
run: yarn package | |
- name: upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: ${{ matrix.package-path }} | |
release: | |
needs: build | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Create artifacts directory | |
run: mkdir -p artifacts | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: artifacts | |
- name: create release | |
run: | | |
yarn install | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |