ADD flow
This commit is contained in:
parent
d96142b348
commit
79c7e24067
30
.github/workflows/tags.yml
vendored
Normal file
30
.github/workflows/tags.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Go-tags
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23.x'
|
||||||
|
- name: install dependencies
|
||||||
|
run: go get .
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TAG_VERSION: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
go build -v -o ./bin/ddnser-$TAG_VERSION ./cmd/...
|
||||||
|
zip -r ddnser-$TAG_VERSION ./bin/ddnser-$TAG_VERSION
|
||||||
|
- name: Push to gitea
|
||||||
|
env:
|
||||||
|
USERNAME: ${{ vars.USERNAME }}
|
||||||
|
TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
TAG_VERSION: ${{ github.ref_name }}
|
||||||
|
run: curl --user $USERNAME:$TOKEN \
|
||||||
|
--upload-file bin/ddnser-$TAG_VERSION.zip \
|
||||||
|
http://10.0.0.171/api/packages/$USERNAME/go/upload
|
||||||
Loading…
x
Reference in New Issue
Block a user