-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.19 KB
/
main.yaml
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
name: Build, Test and Release
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.3.1
install: true
cache: true
experimental: true
- name: Test
run: |
bun install
bun test:ci
- name: Create binary and release files # FIXME: Bun issue with bin path
if: startsWith(github.ref, 'refs/tags/')
run: |
bun build ./lib/main.ts --compile --outfile ./dist/scfz
tar -czvf ./dist/scfz.tar.gz ./lib/scfz
./lib/scfz --version
bun changelog --file dist/changelog.txt --tag $(git tag --sort=v:refname | grep -v beta | tail -n 1)
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
prerelease: ${{contains(github.ref, '-beta')}}
body_path: ./dist/changelog.txt
files: | # FIXME: Bun issue with bin path
./lib/scfz
./dist/scfz.tar.gz
LICENSE