diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c76f975..4780ac0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,11 @@ on: push: tags: - 'v*' + workflow_dispatch: + inputs: + tag: + description: 'Tag name to release (e.g. v1.0.0)' + required: true jobs: build-and-publish: @@ -23,7 +28,10 @@ jobs: - name: Extract version from tag id: version - run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT + run: | + TAG=${{ github.event.inputs.tag || github.ref_name }} + echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT + echo "TAG=$TAG" >> $GITHUB_OUTPUT - name: Build run: dotnet build SecretSecurity/SecretSecurity.csproj --configuration Release @@ -57,5 +65,6 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: + tag_name: ${{ steps.version.outputs.TAG }} files: ./nupkg/*.nupkg generate_release_notes: true