name: Release on: release: types: [published] permissions: contents: write jobs: build-and-upload: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ gitea.ref }} - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Test run: make test - name: Build all artifacts (default + cloud, all platforms) run: | make release make release-cloud - name: Upload artifacts to release env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | api="${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${{ gitea.event.release.id }}/assets" for f in dist/*; do name="$(basename "$f")" echo "uploading $name" curl --fail -sS -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ -F "attachment=@${f};filename=${name}" \ "${api}?name=${name}" done