diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ec31f4..36c92a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,12 @@ on: tags: ["v*"] pull_request: branches: [main] + workflow_dispatch: + inputs: + release_tag: + description: "Tag name for release (e.g. v1.0.0). Leave empty to build without releasing." + required: false + default: "" jobs: unit-test: @@ -79,7 +85,7 @@ jobs: release: needs: [build, integration-test] - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '') runs-on: ubuntu-latest permissions: contents: write @@ -100,6 +106,7 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: + tag_name: ${{ github.event.inputs.release_tag || github.ref_name }} generate_release_notes: true files: | ./rpms/*.rpm