diff --git a/.drone.yml b/.drone.yml index 2882b4f..f9575b0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..28285fd --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..35265ae --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -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}/" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.forgejo/workflows/test.yml similarity index 60% rename from .github/workflows/test.yml rename to .forgejo/workflows/test.yml index 918ba03..a65915b 100644 --- a/.github/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -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 ./... \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 76811cf..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f281cd9..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -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 }}" diff --git a/Dockerfile b/Dockerfile index 60b2a3c..1106141 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/twitch/doc/doc.go b/twitch/doc/doc.go index 5cbed1c..cfa283d 100644 --- a/twitch/doc/doc.go +++ b/twitch/doc/doc.go @@ -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{}),