129 lines
3.2 KiB
YAML
129 lines
3.2 KiB
YAML
|
|
name: Release
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
tags:
|
||
|
|
- 'v*'
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
build-linux:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- name: Checkout
|
||
|
|
uses: actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Set up Go
|
||
|
|
uses: actions/setup-go@v5
|
||
|
|
with:
|
||
|
|
go-version: '1.22'
|
||
|
|
|
||
|
|
- name: Set up Node.js
|
||
|
|
uses: actions/setup-node@v4
|
||
|
|
with:
|
||
|
|
node-version: '20'
|
||
|
|
|
||
|
|
- name: Install system dependencies
|
||
|
|
run: |
|
||
|
|
sudo apt-get update -qq
|
||
|
|
sudo apt-get install -y -qq \
|
||
|
|
libgtk-3-dev \
|
||
|
|
libwebkit2gtk-4.0-dev \
|
||
|
|
pkg-config \
|
||
|
|
build-essential
|
||
|
|
|
||
|
|
- name: Install Wails CLI
|
||
|
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||
|
|
|
||
|
|
- name: Run tests
|
||
|
|
run: go test ./...
|
||
|
|
|
||
|
|
- name: Build
|
||
|
|
run: wails build -platform linux/amd64
|
||
|
|
|
||
|
|
- name: Package artifact
|
||
|
|
run: |
|
||
|
|
cd build/bin
|
||
|
|
tar czf ../../csvtool-linux-amd64.tar.gz csvtool
|
||
|
|
|
||
|
|
- name: Upload artifact
|
||
|
|
uses: actions/upload-artifact@v3
|
||
|
|
with:
|
||
|
|
name: csvtool-linux-amd64
|
||
|
|
path: csvtool-linux-amd64.tar.gz
|
||
|
|
|
||
|
|
build-linux-webkit2_41:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- name: Checkout
|
||
|
|
uses: actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Set up Go
|
||
|
|
uses: actions/setup-go@v5
|
||
|
|
with:
|
||
|
|
go-version: '1.22'
|
||
|
|
|
||
|
|
- name: Set up Node.js
|
||
|
|
uses: actions/setup-node@v4
|
||
|
|
with:
|
||
|
|
node-version: '20'
|
||
|
|
|
||
|
|
- name: Install system dependencies (webkit2gtk-4.1)
|
||
|
|
run: |
|
||
|
|
sudo apt-get update -qq
|
||
|
|
sudo apt-get install -y -qq \
|
||
|
|
libgtk-3-dev \
|
||
|
|
libwebkit2gtk-4.1-dev \
|
||
|
|
pkg-config \
|
||
|
|
build-essential
|
||
|
|
|
||
|
|
- name: Install Wails CLI
|
||
|
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||
|
|
|
||
|
|
- name: Run tests
|
||
|
|
run: go test -tags webkit2_41 ./...
|
||
|
|
|
||
|
|
- name: Build
|
||
|
|
run: wails build -tags webkit2_41 -platform linux/amd64
|
||
|
|
|
||
|
|
- name: Package artifact
|
||
|
|
run: |
|
||
|
|
cd build/bin
|
||
|
|
tar czf ../../csvtool-linux-amd64-webkit2_41.tar.gz csvtool
|
||
|
|
|
||
|
|
- name: Upload artifact
|
||
|
|
uses: actions/upload-artifact@v3
|
||
|
|
with:
|
||
|
|
name: csvtool-linux-amd64-webkit2_41
|
||
|
|
path: csvtool-linux-amd64-webkit2_41.tar.gz
|
||
|
|
|
||
|
|
publish-release:
|
||
|
|
needs: [build-linux, build-linux-webkit2_41]
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- name: Download linux artifact
|
||
|
|
uses: actions/download-artifact@v3
|
||
|
|
with:
|
||
|
|
name: csvtool-linux-amd64
|
||
|
|
path: artifacts/
|
||
|
|
|
||
|
|
- name: Download linux webkit2_41 artifact
|
||
|
|
uses: actions/download-artifact@v3
|
||
|
|
with:
|
||
|
|
name: csvtool-linux-amd64-webkit2_41
|
||
|
|
path: artifacts/
|
||
|
|
|
||
|
|
- name: Create release
|
||
|
|
uses: actions/forgejo-release@v2
|
||
|
|
with:
|
||
|
|
direction: upload
|
||
|
|
tag: ${{ github.ref_name }}
|
||
|
|
title: ${{ github.ref_name }}
|
||
|
|
release-notes: |
|
||
|
|
## CSV Tool ${{ github.ref_name }}
|
||
|
|
|
||
|
|
### Artifacts
|
||
|
|
|
||
|
|
- **csvtool-linux-amd64.tar.gz** — Linux build (webkit2gtk-4.0)
|
||
|
|
- **csvtool-linux-amd64-webkit2_41.tar.gz** — Linux build (webkit2gtk-4.1, for Ubuntu 24.04+)
|
||
|
|
release-dir: artifacts/
|