diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01e6f8b..3cedbb6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,6 @@ name: Release on: - push: - tags: - - "v*" release: types: [published] workflow_dispatch: @@ -217,7 +214,7 @@ jobs: name: Create GitHub Release runs-on: ubuntu-latest needs: [validate, checksums] - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + if: github.event_name == 'workflow_dispatch' steps: - name: Checkout code @@ -234,7 +231,11 @@ jobs: - name: Generate release notes id: release_notes run: | - TAG_NAME="${GITHUB_REF#refs/tags/}" + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + TAG_NAME="${{ github.event.inputs.tag }}" + else + TAG_NAME="${{ github.event.release.tag_name }}" + fi VERSION="${TAG_NAME#v}" # Generate comprehensive release notes @@ -340,8 +341,8 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.ref_name }} - name: "Bose SoundTouch Go Library ${{ github.ref_name }}" + tag_name: ${{ github.event.inputs.tag }} + name: "Bose SoundTouch Go Library ${{ github.event.inputs.tag }}" body_path: ${{ steps.release_notes.outputs.release_notes_file }} draft: false prerelease: ${{ needs.validate.outputs.is_prerelease == 'true' }} @@ -381,7 +382,7 @@ jobs: notify: name: Post-Release Notifications runs-on: ubuntu-latest - needs: [validate, create_release] + needs: [validate, create_release, update_release] if: always() && (needs.create_release.result == 'success' || needs.update_release.result == 'success') steps: @@ -392,7 +393,8 @@ jobs: echo "🔐 Checksums generated and verified" echo "📋 Release notes automatically generated" echo "" - echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" + TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name }}" + echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/${TAG_NAME}" echo "" echo "Next steps:" echo "- Monitor download metrics"