diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ba7af8..cf35f32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,13 @@ on: tags: - '*' + workflow_dispatch: # Allow manual triggering (optional) + inputs: + tag_name: + description: 'Tag to create a release for' + required: true + default: '' + jobs: release: name: Build and publish binaries @@ -68,7 +75,7 @@ jobs: - name: Build with redis cache run: | - maturin build --release -i 3.9 --cargo-extra-args="--features provider_cache_redis" -o _redis + maturin build --release -i 3.9 --cargo-extra-args="--features redis" -o _redis - name: Rename .whl files run: | @@ -77,23 +84,9 @@ jobs: mv "$file" "_out/${filename%.whl}_redis.whl" done - - name: Read .release-note and use it as a body of new release - id: read_release - shell: bash - run: | - r=$(cat .release-note) - r="${r//'%'/'%25'}" - r="${r//$'\n'/'%0A'}" - r="${r//$'\r'/'%0D'}" - echo "::set-output name=RELEASE_BODY::$r" - - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 + - name: Create GitHub Release + id: create_release + uses: ncipollo/release-action@v1 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: _out/*.whl - file_glob: true - tag: ${{ github.ref }} - overwrite: true - body: | - ${{ steps.read_release.outputs.RELEASE_BODY }} + tag: ${{ github.ref_name || github.event.inputs.tag_name }} # Use the tag name from the push event or the manual input + artifacts: "_out/*_redis.whl,_out/*_fs.whl"