I don't understand language that well I guess
All checks were successful
Build & Release / build-and-tag (push) Successful in 9m39s
Build & Release / latest-release (push) Has been skipped
Build & Release / version-release (push) Has been skipped

This commit is contained in:
Salastil
2025-11-16 15:06:54 -05:00
parent 0a924531e1
commit 7df50981ed

View File

@@ -4,9 +4,10 @@ on:
branches: ["master"] branches: ["master"]
tags: tags:
- 'v*.*' - 'v*.*'
- 'latest'
jobs: jobs:
build: build-and-tag:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref_type == 'branch' if: github.ref_type == 'branch'
steps: steps:
@@ -23,12 +24,6 @@ jobs:
go mod tidy go mod tidy
go build -o Sneedchat-Discord-Bridge . go build -o Sneedchat-Discord-Bridge .
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: Sneedchat-Discord-Bridge
path: Sneedchat-Discord-Bridge
- name: Update Latest Tag - name: Update Latest Tag
run: | run: |
git config user.name "Gitea Actions" git config user.name "Gitea Actions"
@@ -36,9 +31,9 @@ jobs:
git tag -f latest git tag -f latest
git push -f origin latest git push -f origin latest
release: latest-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') if: github.ref_type == 'tag' && github.ref_name == 'latest'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -48,7 +43,30 @@ jobs:
with: with:
go-version: "1.22" go-version: "1.22"
- name: Build binaries - name: Build Binary
run: |
go mod tidy
go build -o Sneedchat-Discord-Bridge .
- name: Create Latest Release
uses: actions/release-action@v1
with:
token: ${{ secrets.CI_TOKEN }}
files: Sneedchat-Discord-Bridge
version-release:
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: Build Binaries
run: | run: |
mkdir -p dist mkdir -p dist
go mod tidy go mod tidy
@@ -58,7 +76,7 @@ jobs:
GOOS=darwin GOARCH=amd64 go build -o dist/Sneedchat-Discord-Bridge-darwin-amd64 . GOOS=darwin GOARCH=amd64 go build -o dist/Sneedchat-Discord-Bridge-darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-darwin-arm64 . GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-darwin-arm64 .
- name: Create Gitea Release - name: Create Version Release
uses: actions/release-action@v1 uses: actions/release-action@v1
with: with:
token: ${{ secrets.CI_TOKEN }} token: ${{ secrets.CI_TOKEN }}