fix pipeline #35
Workflow file for this run
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
name: Build and Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build-macos: | |
environment: | |
name: release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install Wails CLI | |
run: | | |
go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
- name: Build for macOS/arm64 | |
run: | | |
wails build -platform darwin/arm64 -ldflags "-X main.Version=$GITHUB_REF_NAME" | |
- name: Upload macOS arm64 binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Dolphin_MacOS | |
path: ./build/bin/Dolphin.app | |
build-windows-and-linux: | |
environment: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev nsis | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install Wails CLI | |
run: | | |
go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
- name: Build for Windows/amd64 | |
run: | | |
wails build -platform windows/amd64 -ldflags "-X main.Version=$GITHUB_REF_NAME" --nsis | |
mv ./build/bin ./build/Dolphin_Windows_Amd64-Setup | |
- name: Build for Linux/amd64 | |
run: | | |
wails build -platform linux/amd64 -ldflags "-X main.Version=$GITHUB_REF_NAME" | |
mv ./build/bin ./build/Dolphin_Linux_Amd64 | |
- name: Upload Windows/amd64 installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Dolphin_Windows_Setup | |
path: ./build/Dolphin_Windows_Amd64-Setup | |
- name: Upload Linux/amd64 binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Dolphin_Linux | |
path: ./build/Dolphin_Linux_Amd64 | |
create-release: | |
environment: | |
name: release | |
runs-on: ubuntu-latest | |
needs: | |
- build-macos | |
- build-windows-and-linux | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download macOS arm64 binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: Dolphin-MacOS | |
- name: Download Windows amd64 installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: Dolphin_Windows_Amd64_Setup | |
- name: Download Linux amd64 binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: Dolphin_Linux_Amd64 | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./Dolphin_MacOS.zip | |
./Dolphin_Windows_Setup.zip | |
./Dolphin_Linux.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |