diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..2c3d9d1 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,35 @@ +name: Release Go Application +on: + release: + types: [published] + workflow_run: + workflows: [Go Project Action] + types: [completed] + +jobs: + release: + name: Release go project + runs-on: ubuntu-latest + timeout-minutes: 15 + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Go installation + uses: actions/setup-go@v5 + with: + go-version: 1.23.x + - name: Install dependencies + run: go get . + - name: Build + run: go build -ldflags "-s -w" -o ./bin/serve main.go + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: serve + path: ./bin/serve + on-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - run: echo 'Cannot release with failing tests'