This commit is contained in:
@@ -1,29 +1,31 @@
|
|||||||
name: Build
|
name: Build Go project
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- 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
|
- name: Build binary
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
go mod download
|
go mod download
|
||||||
go build -o Sneedchat-Discord-Bridge .
|
go build -o dist/Sneedchat-Discord-Bridge .
|
||||||
|
|
||||||
- name: Archive build artifact
|
- name: Upload Gitea artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: https://gitea.com/actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: sneedchatdiscordbridge
|
name: sneedchatdiscordbridge
|
||||||
path: Sneedchat-Discord-Bridge
|
path: dist/Sneedchat-Discord-Bridge
|
||||||
|
|||||||
@@ -3,32 +3,31 @@ name: Build & Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- "v*.*.*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- 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 binaries
|
- name: Build release 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: Create Release
|
- name: Publish to Gitea Release
|
||||||
uses: https://gitea.com/actions/release-action@v1
|
uses: https://gitea.com/actions/release-action@v2
|
||||||
with:
|
with:
|
||||||
api_key: ${{ secrets.CI_TOKEN }}
|
api_key: ${{ secrets.CI_TOKEN }}
|
||||||
owner: Salastil
|
owner: Salastil
|
||||||
|
|||||||
Reference in New Issue
Block a user