chore: workflow, fix windows release assets #10
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 Medict Tasks | |
on: | |
push: | |
# tags: | |
# - v* | |
branches: | |
- master | |
- develop | |
jobs: | |
package: | |
strategy: | |
matrix: | |
go-version: [1.21.x] | |
platform: [ubuntu-20.04] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Get version tag (unix) | |
if: matrix.platform != 'windows-2019' | |
id: version | |
run: echo "::set-output name=tag::${GITHUB_SHA}" | |
- name: Inall pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.7.4 | |
run_install: false | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Chechout | |
uses: actions/checkout@v2 | |
- name: Install Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
# linux | |
- name: Build for linux | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt update && sudo apt install -y libgtk-3-dev libwebkit2gtk-4.0-dev | |
wails build -f -ldflags "-X main.Version=${{ steps.version.outputs.tag }}" | |
ls -lh $PWD && ls -lh $PWD/build | |
tar -C build/bin -zcvf Medict_${{ steps.version.outputs.tag }}_Linux_x86_64.tar.gz Medict | |
- name: Upload linux tar.gz | |
if: matrix.platform == 'ubuntu-20.04' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Medict_${{ steps.version.outputs.tag }}_Linux_x86_64.tar.gz | |
path: Medict_${{ steps.version.outputs.tag }}_Linux_x86_64.tar.gz | |
# - name: Create linux app image | |
# if: matrix.platform == 'ubuntu-16.04' | |
# run: | | |
# wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
# chmod +x linuxdeploy-x86_64.AppImage | |
# mogrify -resize 512x512 appicon.png | |
# ./linuxdeploy*.AppImage --appdir AppDir --executable build/wombat --desktop-file AppImage.desktop --icon-file appicon.png --output appimage | |
# mv Wombat*.AppImage Wombat_${{ steps.version.outputs.tag }}_Linux_x86_64.AppImage | |
# - name: Upload linux app image | |
# if: matrix.platform == 'ubuntu-16.04' | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: Wombat_${{ steps.version.outputs.tag }}_Linux_x86_64.AppImage | |
# path: Wombat_${{ steps.version.outputs.tag }}_Linux_x86_64.AppImage |