n/a
This commit is contained in:
@@ -4,36 +4,11 @@ on:
|
||||
branches: ["master"]
|
||||
tags:
|
||||
- 'v*.*'
|
||||
- 'latest'
|
||||
|
||||
jobs:
|
||||
build-and-tag:
|
||||
build-latest:
|
||||
runs-on: ubuntu-latest
|
||||
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:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -47,11 +22,34 @@ jobs:
|
||||
run: |
|
||||
go mod tidy
|
||||
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
|
||||
uses: actions/release-action@v1
|
||||
with:
|
||||
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
|
||||
|
||||
version-release:
|
||||
@@ -66,7 +64,7 @@ jobs:
|
||||
with:
|
||||
go-version: "1.22"
|
||||
|
||||
- name: Build Binaries
|
||||
- name: Build Multi-Platform Binaries
|
||||
run: |
|
||||
mkdir -p dist
|
||||
go mod tidy
|
||||
|
||||
Reference in New Issue
Block a user