Skip to content

Commit

Permalink
fix: GitHub release job
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Nunamaker committed Jul 27, 2024
1 parent 08c3050 commit c36207c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,29 @@ jobs:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.3
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
- name: Create GitHub Release and Upload Artifacts
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ needs.release-please.outputs.tag_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ needs.release-please.outputs.tag_name }}' dist/**
--repo '${{ github.repository }}'
run: |
set -e
echo "Creating GitHub release..."
gh release create '${{ needs.release-please.outputs.tag_name }}' \
--repo '${{ github.repository }}' \
--notes "Release ${{ needs.release-please.outputs.tag_name }}" \
|| { echo "Failed to create release"; exit 1; }
echo "Uploading artifacts to release..."
gh release upload '${{ needs.release-please.outputs.tag_name }}' dist/** \
--repo '${{ github.repository }}' \
|| { echo "Failed to upload artifacts"; exit 1; }
echo "Release creation and artifact upload completed successfully"
- name: Set job output
if: failure()
run: echo "release_failed=true" >> $GITHUB_OUTPUT
10 changes: 5 additions & 5 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"packages": {
".": {
"release-type": "python",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"release-type": "python",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"versioning": {
"versioning-strategy": "always-bump-minor"
}
},
}
}

0 comments on commit c36207c

Please sign in to comment.