forked from FooSoft/yomichan-import
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Linux Build and Release Workflow (#11)
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 | ||
token: ${{ secrets.GITHUB_TOKEN }} |