-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.2 KB
/
release.yml
File metadata and controls
45 lines (43 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish release on version change
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
released: ${{ steps.release.outputs.released }}
release_id: ${{ steps.release.outputs.release_id }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Release
uses: justincy/github-action-npm-release@2.0.2
id: release
- name: Print release output
if: ${{ steps.release.outputs.released == 'true' }}
run: echo Release ID ${{ steps.release.outputs.release_id }}
build:
name: Build binaries
needs: [release]
if: needs.release.outputs.released == 'true'
runs-on: ubuntu-latest
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun run build:all
- name: Upload artifacts
uses: AButler/upload-release-assets@v3.0
with:
files: "dist/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-id: ${{ needs.release.outputs.release_id }}