ci: new setup
Test / test (push) Waiting to run Details
Build / build (push) Failing after 21s Details

This commit is contained in:
Ash Keel 2024-04-20 16:56:26 +02:00
parent dac126e891
commit 4c5bf8fd78
No known key found for this signature in database
GPG Key ID: 53A9E9A6035DD109
8 changed files with 65 additions and 79 deletions

View File

@ -8,7 +8,7 @@ trigger:
steps:
- name: Build
image: ghcr.io/abjrcode/cross-wails:v2.6.0
image: ghcr.io/abjrcode/cross-wails:v2.8.1
commands:
- apt-get update
- apt-get install -y upx

View File

@ -0,0 +1,24 @@
name: Build
on:
push:
pull_request:
workflow_dispatch:
env:
GOPRIVATE: git.sr.ht
jobs:
build:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Setup Wails
run: |
- go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build
run: |
- wails build

View File

@ -0,0 +1,32 @@
name: Release new version
on:
push:
tags:
- "v*.*.*"
- "v*.*.*-alpha.*"
- "v*.*.*-beta.*"
- "v*.*.*-rc.*"
env:
GOPRIVATE: git.sr.ht
jobs:
build:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Setup Wails
run: |
- go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build releases
run: |
- apt-get update && apt-get install -y upx
- GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc wails build -ldflags "-X main.appVersion=${GITHUB_REF_NAME}" -platform linux/amd64 -upx -upxflags "-9" -o strimertul-amd64
- GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc wails build -ldflags "-X main.appVersion=${GITHUB_REF_NAME}" -m -nosyncgomod -skipbindings -s -platform linux/arm64 -upx -upxflags "-9" -o strimertul-arm64
- GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc wails build -ldflags "-X main.appVersion=${GITHUB_REF_NAME}" -m -nosyncgomod -skipbindings -s -platform windows/amd64 -upx -upxflags "-9"
- mkdir build/bin/{{ github.ref_name }}
- mv build/bin/strimertul* "build/bin/${GITHUB_REF_NAME}/"

View File

@ -12,10 +12,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version-file: 'go.mod'
- name: Test
run: go test -v ./...

View File

@ -1,21 +0,0 @@
name: Build
on:
push:
pull_request:
workflow_dispatch:
env:
GOPRIVATE: git.sr.ht
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ashkeel/wails-build-action@bf2d6a3c440266e9bb8b3527a4b1db1896dccbab
with:
build-name: strimertul
build-platform: linux/amd64
package: false
go-version: "1.21"

View File

@ -1,53 +0,0 @@
name: Release
on:
push:
tags:
- "v*.*.*"
- "v*.*.*-beta.*"
- "v*.*.*-rc.*"
env:
GOPRIVATE: git.sr.ht
jobs:
release:
strategy:
fail-fast: false
matrix:
build:
[
{
name: strimertul-linux-amd64,
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:
- uses: actions/checkout@v2
- name: Process version tag
id: version
uses: ncipollo/semantic-version-action@v1
- name: Update wails.json fileVersion
uses: jossef/action-set-json-field@v2.1
with:
file: wails.json
field: info.productVersion
value: "${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}"
- uses: ashkeel/wails-build-action@0faaf35c690d88c3463349c6bf0bbdc53af5e5a8
with:
build-name: ${{ matrix.build.name }}
build-platform: ${{ matrix.build.platform }}
windows-nsis-installer: false
macos-package-file-name: strimertul
macos-package-type: dmg
go-version: "1.21"
draft: true
ldflags: "-X main.appVersion=${{ github.ref_name }}"

View File

@ -1,4 +1,4 @@
ARG BASE_IMAGE=ghcr.io/abjrcode/cross-wails:v2.6.0
ARG BASE_IMAGE=ghcr.io/abjrcode/cross-wails:v2.8.0
FROM ${BASE_IMAGE} as builder

View File

@ -40,6 +40,10 @@ var Keys = interfaces.KeyMap{
Description: "Chat custom commands",
Type: reflect.TypeOf(map[string]chat.CustomCommand{}),
},
chat.CustomAccountKey: interfaces.KeyDef{
Description: "User access token for the chat account (if not using the main one)",
Type: reflect.TypeOf(twitch.AuthResponse{}),
},
chat.WriteMessageRPC: interfaces.KeyDef{
Description: "Send chat message with extra options (as reply, whisper, etc)",
Type: reflect.TypeOf(chat.WriteMessageRequest{}),