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