From 048b9b8547a9ab6bbbb86a60703acce7a9d546a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 8 Dec 2024 17:30:36 +0100 Subject: [PATCH] Automated release --- .gitea/workflows/build.yml | 38 ++++++++++++++++++++++---------------- Taskfile.yml | 3 ++- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index bbd6145..edbcca9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -2,14 +2,12 @@ name: Build and release on: - release: - types: [published] - # workflow_dispatch: - # inputs: - # version: - # description: 'Version' - # required: true - # default: 'v0' + workflow_dispatch: + inputs: + version: + description: 'Version' + required: true + default: 'v0' jobs: test: @@ -36,12 +34,20 @@ jobs: run: | task build VERSION=${{ github.ref_name }} - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Upload Release Asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: ./lobby2-${{ github.ref_name }}-amd64 + # asset_name: lobby2-${{ github.ref_name }}-amd64 + # asset_content_type: application/octet-stream + + - uses: actions/forgejo-release@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./lobby2-${{ github.ref_name }}-amd64 - asset_name: lobby2-${{ github.ref_name }}-amd64 - asset_content_type: application/octet-stream + token: ${{ secrets.GITHUB_TOKEN }} + direction: upload + url: https://gitea.ceperka.net + release-dir: bin/ + release-notes-assistant: true diff --git a/Taskfile.yml b/Taskfile.yml index c5ee84f..45706b0 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -18,4 +18,5 @@ tasks: build: cmds: - go mod tidy - - go build -o lobby2-{{ .VERSION }}-amd64 cli/*.go + - mkdir -p bin + - go build -o bin/lobby2-{{ .VERSION }}-amd64 cli/*.go