This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
name: Build Go project
|
||||
name: Build Go Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,21 +10,20 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.22"
|
||||
|
||||
- name: Build binary
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p dist
|
||||
go mod download
|
||||
go build -o dist/Sneedchat-Discord-Bridge .
|
||||
|
||||
- name: Upload Gitea artifact
|
||||
uses: https://gitea.com/actions/upload-artifact@v1
|
||||
- name: Upload artifact
|
||||
uses: https://gitea.com/gitea/actions/upload-artifact@main
|
||||
with:
|
||||
name: sneedchatdiscordbridge
|
||||
path: dist/Sneedchat-Discord-Bridge
|
||||
path: dist/*
|
||||
|
||||
@@ -11,29 +11,30 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.22"
|
||||
|
||||
- name: Build release binaries
|
||||
- name: Build binaries
|
||||
run: |
|
||||
mkdir -p dist
|
||||
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=darwin GOARCH=amd64 go build -o dist/sneedchat-bridge-macos-amd64 .
|
||||
GOOS=darwin GOARCH=arm64 go build -o dist/sneedchat-bridge-macos-arm64 .
|
||||
|
||||
- name: Publish to Gitea Release
|
||||
uses: https://gitea.com/actions/release-action@v2
|
||||
- name: Create Release
|
||||
uses: https://gitea.com/actions/release-action@v1
|
||||
with:
|
||||
api_key: ${{ secrets.CI_TOKEN }}
|
||||
owner: Salastil
|
||||
repo: Sneedchat-Discord-Bridge-Go
|
||||
tag: ${{ github.ref_name }}
|
||||
name: Release ${{ github.ref_name }}
|
||||
tag: ${{ gitea.ref_name }}
|
||||
name: Release ${{ gitea.ref_name }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: dist/*
|
||||
|
||||
Reference in New Issue
Block a user