diff --git a/.gitea/workflows/build_release.yaml b/.gitea/workflows/build-release-binary.yaml similarity index 81% rename from .gitea/workflows/build_release.yaml rename to .gitea/workflows/build-release-binary.yaml index 5ff4026..b1d867a 100644 --- a/.gitea/workflows/build_release.yaml +++ b/.gitea/workflows/build-release-binary.yaml @@ -1,7 +1,15 @@ -name: "Build Release" +name: "Build Release Binary" run-name: "Build Release: ${{ inputs.tag_name }}" on: + # Allows triggering from another workflow + workflow_call: + inputs: + tag_name: + description: 'Git tag to build (e.g., v1.0.0)' + required: true + type: string + workflow_dispatch: # Enables manual triggering inputs: tag_name: diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..ad483a4 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,40 @@ +name: Create Release with Binary + +on: + workflow_dispatch: # Enables manual triggering + inputs: + tag_name: + description: 'Git tag to build (e.g., v1.0.0)' + required: true + type: string + rel_description: + description: 'Release description' + required: false + type: string + + +jobs: + # This job calls the reusable workflow + build-binary: + uses: ./.gitea/workflows/build-release-binary.yml + with: + tag_name: ${{ inputs.tag_name }} + + create-release: + needs: build-binary # Wait for the reusable workflow to finish + runs-on: ubuntu-latest + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: nyanit-${{ inputs.tag_name }} + + - name: Create Release and Attach Binary + uses: actions/release-action@main + with: + artifacts: "nyanit-${{ inputs.tag_name }}" + api_key: ${{ secrets.bzzpss_release_psszz }} + tag_name: ${{ inputs.tag_name }} + name: Release ${{ inputs.tag_name }} + body: "Automated release for ${{ inputs.tag_name }}\n${{ inputs.rel_description }}" +