Build learning changes
This commit is contained in:
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -17,13 +17,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.22"
|
||||||
|
|
||||||
- name: Build
|
- name: Download dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
go build -o Sneedchat-Discord-Bridge .
|
|
||||||
|
|
||||||
- name: Archive build artifact
|
- name: Build binary
|
||||||
|
run: go build -o Sneedchat-Discord-Bridge .
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: sneedchatdiscordbridge
|
name: Sneedchat-Discord-Bridge
|
||||||
path: Sneedchat-Discord-Bridge
|
path: Sneedchat-Discord-Bridge
|
||||||
|
|||||||
@@ -1,43 +1,41 @@
|
|||||||
name: "Build and Release"
|
name: Build & Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: '1.23'
|
go-version: "1.22"
|
||||||
|
|
||||||
- name: Build Linux AMD64
|
- name: Build cross-platform binaries
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
GOOS=linux GOARCH=amd64 go build -o dist/Sneedchat-Discord-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=darwin GOARCH=amd64 go build -o dist/sneedchat-bridge-macos-amd64 .
|
||||||
|
GOOS=darwin GOARCH=arm64 go build -o dist/sneedchat-bridge-macos-arm64 .
|
||||||
|
|
||||||
- name: Build Linux ARM64
|
- name: Create Gitea Release
|
||||||
run: |
|
uses: https://gitea.com/actions/release-action@v1
|
||||||
GOOS=linux GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-linux-arm64
|
|
||||||
|
|
||||||
- name: Build Windows AMD64
|
|
||||||
run: |
|
|
||||||
GOOS=windows GOARCH=amd64 go build -o dist/Sneedchat-Discord-Bridge-windows-amd64.exe
|
|
||||||
|
|
||||||
- name: Build macOS ARM64
|
|
||||||
run: |
|
|
||||||
GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-macos-arm64
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: https://gitea.com/actions/release-action@main
|
|
||||||
with:
|
with:
|
||||||
api_key: ${{ secrets.GITEA_TOKEN }}
|
api_key: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
owner: Salastil
|
||||||
|
repo: Sneedchat-Discord-Bridge-Go
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
name: "Release ${{ github.ref_name }}"
|
||||||
|
prerelease: false
|
||||||
|
draft: false
|
||||||
files: |
|
files: |
|
||||||
dist/*
|
dist/*
|
||||||
|
|||||||
Reference in New Issue
Block a user