n/a
This commit is contained in:
@@ -4,36 +4,11 @@ on:
|
|||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*'
|
- 'v*.*'
|
||||||
- 'latest'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-tag:
|
build-latest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref_type == 'branch'
|
if: github.ref_type == 'branch'
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: "1.22"
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
go mod tidy
|
|
||||||
go build -o Sneedchat-Discord-Bridge .
|
|
||||||
|
|
||||||
- name: Update Latest Tag
|
|
||||||
run: |
|
|
||||||
git config user.name "Gitea Actions"
|
|
||||||
git config user.email "actions@gitea.local"
|
|
||||||
git tag -f latest
|
|
||||||
git push -f origin latest
|
|
||||||
|
|
||||||
latest-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.ref_type == 'tag' && github.ref_name == 'latest'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -48,10 +23,33 @@ jobs:
|
|||||||
go mod tidy
|
go mod tidy
|
||||||
go build -o Sneedchat-Discord-Bridge .
|
go build -o Sneedchat-Discord-Bridge .
|
||||||
|
|
||||||
|
- name: Delete Previous Latest Release
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
curl -X DELETE \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||||
|
"https://git.salastil.com/api/v1/repos/Salastil/Sneedchat-Discord-Bridge-Go/releases/tags/latest"
|
||||||
|
|
||||||
|
- name: Delete Latest Tag
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
git push origin :refs/tags/latest || true
|
||||||
|
|
||||||
|
- name: Create Latest Tag
|
||||||
|
run: |
|
||||||
|
git config user.name "Gitea Actions"
|
||||||
|
git config user.email "actions@gitea.local"
|
||||||
|
git tag latest
|
||||||
|
git push origin latest
|
||||||
|
|
||||||
- name: Create Latest Release
|
- name: Create Latest Release
|
||||||
uses: actions/release-action@v1
|
uses: actions/release-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CI_TOKEN }}
|
token: ${{ secrets.CI_TOKEN }}
|
||||||
|
tag_name: latest
|
||||||
|
name: Latest Build (Development)
|
||||||
|
body: "Automated build from master branch. This is a development build."
|
||||||
|
prerelease: true
|
||||||
files: Sneedchat-Discord-Bridge
|
files: Sneedchat-Discord-Bridge
|
||||||
|
|
||||||
version-release:
|
version-release:
|
||||||
@@ -66,7 +64,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.22"
|
||||||
|
|
||||||
- name: Build Binaries
|
- name: Build Multi-Platform Binaries
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|||||||
Reference in New Issue
Block a user