-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update release workflow based on pegen example
- Loading branch information
1 parent
430ee71
commit 38b8159
Showing
4 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,36 +76,7 @@ jobs: | |
name: artifact | ||
path: dist/*.whl | ||
|
||
release_upload: | ||
name: Create Release and Upload Release Asset | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
needs: [build_wheels, build_sdist] | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: ${{ contains(github.ref, '.rc') || contains(github.ref, '.a') || contains(github.ref, '.b')}} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: shogo82148/actions-upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/* | ||
|
||
upload_pypi: | ||
publish: | ||
if: github.event_name == 'push' | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
|
@@ -121,3 +92,44 @@ jobs: | |
password: ${{ secrets.pypi_password }} | ||
# To test: | ||
# repository_url: https://test.pypi.org/legacy/ | ||
|
||
github-release: | ||
name: >- | ||
Sign the Python 🐍 distribution 📦 with Sigstore | ||
and create a GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: | ||
- publish | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
password: ${{ secrets.pypi_password }} | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
gh release create | ||
'${{ github.ref_name }}' | ||
--repo '${{ github.repository }}' | ||
--generate-notes | ||
- name: Upload artifact signatures to GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
gh release upload | ||
'${{ github.ref_name }}' dist/** | ||
--repo '${{ github.repository }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
/.eggs | ||
/.cache | ||
|
||
.dmypy.json | ||
.gitignore~ | ||
*.orig | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters