forked from FooSoft/yomichan-import
-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (40 loc) · 1.18 KB
/
build-and-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
name: Build and Release
on: push
jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
id: go
- name: Install Packages
run: |
sudo apt-get install libgtk-3-dev -y
- name: Build for Linux
run: |
# Create build directory
build_dir="yomitan-import-linux"
mkdir -p "$build_dir"
# Build
go build -o "$build_dir" ./yomitan
go build -o "$build_dir" ./yomitan-gtk
# Zip the build directory
zip -r "$build_dir.zip" "$build_dir"
- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
with:
path: yomitan-import-linux.zip
name: yomitan-import-linux
- name: Release on Tag Creation
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
yomitan-import-linux.zip
draft: true
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}