From 79c7e2406780864c946334f81dc2fe18a60b2833 Mon Sep 17 00:00:00 2001 From: maximo tejeda Date: Wed, 13 Nov 2024 20:16:28 -0400 Subject: [PATCH] ADD flow --- .github/workflows/tags.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tags.yml diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml new file mode 100644 index 0000000..7e6624b --- /dev/null +++ b/.github/workflows/tags.yml @@ -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