Skip to content

Commit

Permalink
Add Linux Build and Release Workflow (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC authored Oct 1, 2023
1 parent 5a6c9f7 commit e056399
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-and-release.yaml
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 }}

0 comments on commit e056399

Please sign in to comment.