I don't understand language that well I guess
This commit is contained in:
@@ -4,9 +4,10 @@ on:
|
||||
branches: ["master"]
|
||||
tags:
|
||||
- 'v*.*'
|
||||
- 'latest'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-tag:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref_type == 'branch'
|
||||
steps:
|
||||
@@ -23,12 +24,6 @@ jobs:
|
||||
go mod tidy
|
||||
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
|
||||
run: |
|
||||
git config user.name "Gitea Actions"
|
||||
@@ -36,9 +31,9 @@ jobs:
|
||||
git tag -f latest
|
||||
git push -f origin latest
|
||||
|
||||
release:
|
||||
latest-release:
|
||||
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:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -48,7 +43,30 @@ jobs:
|
||||
with:
|
||||
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: |
|
||||
mkdir -p dist
|
||||
go mod tidy
|
||||
@@ -58,7 +76,7 @@ jobs:
|
||||
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 .
|
||||
|
||||
- name: Create Gitea Release
|
||||
- name: Create Version Release
|
||||
uses: actions/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CI_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user