n/a
Some checks failed
Build Go Project / build (push) Failing after 7s

This commit is contained in:
Salastil
2025-11-16 13:53:01 -05:00
parent 4347455435
commit f265393ed8
2 changed files with 14 additions and 15 deletions

View File

@@ -1,9 +1,8 @@
name: Build Go project name: Build Go Project
on: on:
push: push:
branches: ["master"] branches: ["master"]
pull_request:
jobs: jobs:
build: build:
@@ -11,21 +10,20 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: "1.22" go-version: "1.22"
- name: Build binary - name: Build
run: | run: |
mkdir -p dist mkdir -p dist
go mod download
go build -o dist/Sneedchat-Discord-Bridge . go build -o dist/Sneedchat-Discord-Bridge .
- name: Upload Gitea artifact - name: Upload artifact
uses: https://gitea.com/actions/upload-artifact@v1 uses: https://gitea.com/gitea/actions/upload-artifact@main
with: with:
name: sneedchatdiscordbridge name: sneedchatdiscordbridge
path: dist/Sneedchat-Discord-Bridge path: dist/*

View File

@@ -11,29 +11,30 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: "1.22" go-version: "1.22"
- name: Build release binaries - name: Build binaries
run: | run: |
mkdir -p dist mkdir -p dist
GOOS=linux GOARCH=amd64 go build -o dist/sneedchat-bridge-linux-amd64 . GOOS=linux GOARCH=amd64 go build -o dist/sneedchat-bridge-linux-amd64 .
GOOS=linux GOARCH=arm64 go build -o dist/sneedchat-bridge-linux-arm64 .
GOOS=windows GOARCH=amd64 go build -o dist/sneedchat-bridge-windows-amd64.exe . GOOS=windows GOARCH=amd64 go build -o dist/sneedchat-bridge-windows-amd64.exe .
GOOS=darwin GOARCH=amd64 go build -o dist/sneedchat-bridge-macos-amd64 . GOOS=darwin GOARCH=amd64 go build -o dist/sneedchat-bridge-macos-amd64 .
GOOS=darwin GOARCH=arm64 go build -o dist/sneedchat-bridge-macos-arm64 . GOOS=darwin GOARCH=arm64 go build -o dist/sneedchat-bridge-macos-arm64 .
- name: Publish to Gitea Release - name: Create Release
uses: https://gitea.com/actions/release-action@v2 uses: https://gitea.com/actions/release-action@v1
with: with:
api_key: ${{ secrets.CI_TOKEN }} api_key: ${{ secrets.CI_TOKEN }}
owner: Salastil owner: Salastil
repo: Sneedchat-Discord-Bridge-Go repo: Sneedchat-Discord-Bridge-Go
tag: ${{ github.ref_name }} tag: ${{ gitea.ref_name }}
name: Release ${{ github.ref_name }} name: Release ${{ gitea.ref_name }}
draft: false draft: false
prerelease: false prerelease: false
files: dist/* files: dist/*