mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-20 02:00:49 +00:00
Update workflows
This commit is contained in:
parent
7ba233dda4
commit
1268f7114b
2 changed files with 41 additions and 31 deletions
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
|
@ -20,11 +20,30 @@ jobs:
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
- name: Build frontend
|
- name: Install Wails
|
||||||
run: |
|
if: inputs.build == 'true'
|
||||||
cd frontend
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@${{inputs.wails-version}}
|
||||||
npm install
|
shell: bash
|
||||||
npm run build
|
- name: Install Linux Wails deps
|
||||||
- name: Build app
|
if: inputs.build == 'true' && runner.os == 'Linux'
|
||||||
run: |
|
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu
|
||||||
go build .
|
shell: bash
|
||||||
|
- name: Install macOS Wails deps
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: brew install mitchellh/gon/gon
|
||||||
|
shell: bash
|
||||||
|
- name: Build App
|
||||||
|
if: inputs.build == 'true' && runner.os == 'macOS'
|
||||||
|
working-directory: ${{ inputs.app-working-directory }}
|
||||||
|
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
|
||||||
|
shell: bash
|
||||||
|
- name: Build App
|
||||||
|
if: inputs.build == 'true' && runner.os == 'Linux'
|
||||||
|
working-directory: ${{ inputs.app-working-directory }}
|
||||||
|
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
|
||||||
|
shell: bash
|
||||||
|
- name: Build App
|
||||||
|
if: inputs.build == 'true' && runner.os == 'Windows'
|
||||||
|
working-directory: ${{ inputs.app-working-directory }}
|
||||||
|
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
|
||||||
|
shell: bash
|
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
|
@ -7,29 +7,20 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build: [
|
||||||
|
{name: strimertul, platform: linux/amd64, os: ubuntu-latest},
|
||||||
|
{name: strimertul, platform: windows/amd64, os: windows-latest},
|
||||||
|
{name: strimertul, platform: darwin/universal, os: macos-latest}
|
||||||
|
]
|
||||||
|
runs-on: ${{ matrix.build.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- name: Setup Go environment
|
|
||||||
uses: actions/setup-go@v2.1.4
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
submodules: recursive
|
||||||
- name: Setup Node.js
|
- uses: dAppServer/wails-build-action@v2
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
build-name: ${{ matrix.build.name }}
|
||||||
- name: Build frontend
|
build-platform: ${{ matrix.build.platform }}
|
||||||
run: |
|
|
||||||
cd frontend
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
- name: Build app for all platforms
|
|
||||||
run: |
|
|
||||||
go install github.com/mitchellh/gox@latest
|
|
||||||
gox -arch="amd64 arm" -os "windows linux" -ldflags "-X 'main.appVersion=`git describe --tags --always`'"
|
|
||||||
- name: Create release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
prerelease: true
|
|
||||||
files: |
|
|
||||||
strimertul_*
|
|
||||||
|
|
Loading…
Reference in a new issue