-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.83 KB
/
release.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release CLI
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Generate version
id: version
uses: paulhatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "BREAKING CHANGE:"
minor_pattern: "feat:"
- name: Write version in the main file
run: sed -i "s/__VERSION__/${{ steps.version.outputs.version }}/g" ./src/main.ts
- name: Build CLI for aarch64-apple-darwin
run: |
export COMPILE_TARGET=aarch64-apple-darwin
export COMPILE_NAME=dot-darwin-arm64
deno run compile
- name: Build CLI for x86_64-apple-darwin
run: |
export COMPILE_TARGET=x86_64-apple-darwin
export COMPILE_NAME=dot-darwin-x64
deno run compile
- name: Build CLI for x86_64-unknown-linux-gnu
run: |
export COMPILE_TARGET=x86_64-unknown-linux-gnu
export COMPILE_NAME=dot-linux-x64
deno run compile
- name: Build CLI for aarch64-unknown-linux-gnu
run: |
export COMPILE_TARGET=aarch64-unknown-linux-gnu
export COMPILE_NAME=dot-linux-arm64
deno run compile
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
files: ./build/*
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}