-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (106 loc) · 3.29 KB
/
release.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build Artifacts
on:
workflow_dispatch:
inputs:
do_release:
description: "Perform a release?"
required: true
type: boolean
default: false
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: cargo build --release --bin aplang
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: windows-binary
path: target/release/aplang.exe
build-windows-portable:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release --no-default-features --features portable --bin aplang
mv target/release/aplang.exe target/release/aplang-portable.exe
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: windows-portable-binary
path: target/release/aplang-portable.exe
build-macos:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release --no-default-features --features portable --bin aplang
mv target/release/aplang target/release/aplang-portable
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: macos-binary
path: target/release/aplang-portable
build-macos-portable:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: cargo build --release --no-default-features --features portable --bin aplang
- name: Upload build artifact
uses: actions/upload-artifact@v4.6.0
with:
name: macos-portable-binary
path: target/release/aplang
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-windows, build-windows-portable, build-macos, build-macos-portable]
steps:
- name: Download Windows binary
uses: actions/download-artifact@v4
with:
name: windows-binary
path: artifacts/windows-binary/
- name: Download Windows portable binary
uses: actions/download-artifact@v4
with:
name: windows-portable-binary
path: artifacts/windows-portable-binary/
- name: Download macOS binary
uses: actions/download-artifact@v4
with:
name: macos-binary
path: artifacts/macos-binary/
- name: Download macOS portable binary
uses: actions/download-artifact@v4
with:
name: macos-portable-binary
path: artifacts/macos-portable-binary/
- name: List Downloaded Files
run: ls -R artifacts
- name: Create GitHub Release
if: github.event.inputs.do_release == 'true'
uses: softprops/action-gh-release@v2
with:
prerelease: true
draft: true
generate_release_notes: true
files: |
artifacts/windows-binary/aplang.exe
artifacts/windows-portable-binary/aplang-portable.exe
artifacts/macos-binary/aplang
artifacts/macos-portable/aplang-portable