-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (84 loc) · 2.56 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Wails build
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
NODE_OPTIONS: "--max-old-space-size=4096"
jobs:
build:
name: Build
strategy:
matrix:
os: [windows]
arch: [amd64]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Golang
uses: actions/setup-go@v5
with:
check-latest: true
go-version: '1.21'
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: '21.5'
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/[email protected]
- name: Install Linux Wails deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu
- name: Install macOS Wails deps
if: runner.os == 'macOS'
run: brew install mitchellh/gon/gon
- name: Build App
run: wails build --platform ${{ matrix.os}}/${{ matrix.arch }} -webview2 download -o marshaller-${{ matrix.os }}-${{ matrix.arch }}
- name: Add macOS permissions
if: runner.os == 'macOS'
run: chmod +x build/bin/*/Contents/MacOS/*
shell: bash
- name: Add Linux permissions
if: runner.os == 'Linux'
run: chmod +x build/bin/*
shell: bash
- run: for x in marshaller-windows-*; do mv $x $x.exe; done
working-directory: ./build/bin/
if: matrix.os == 'windows'
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: marshaller-${{ matrix.os }}-${{ matrix.arch }}
path: ./build/bin/marshaller-*
retention-days: 1
create_release:
if: github.event_name == 'push'
name: Create release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release tag
id: create_release
run: |
TAG="v$(date +'%d%m%Y')-$(echo ${{ github.sha }} | cut -c1-8)"
echo "Creating release tag $TAG"
echo "::set-output name=tag::$TAG"
- run: mv ./artifacts/**/marshaller-* ./
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: ./marshaller-*
generateReleaseNotes: true
tag: ${{ steps.create_release.outputs.tag }}