-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show helpful error message when task executable is not on the path
- Loading branch information
Showing
4 changed files
with
103 additions
and
18 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 |
---|---|---|
|
@@ -61,8 +61,8 @@ jobs: | |
- name: Run tests | ||
run: poetry run pytest -v | ||
|
||
build-release: | ||
name: Build and release | ||
build: | ||
name: Build distribution | ||
runs-on: ubuntu-latest | ||
needs: [code-quality, run-tests] | ||
steps: | ||
|
@@ -78,18 +78,76 @@ jobs: | |
- name: Build package | ||
run: poetry build | ||
|
||
- name: Publish package to PyPI | ||
- name: Store the distribution packages | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
run: poetry publish -n | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Update homebrew formula | ||
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/poethepoet | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
homebrew-publish: | ||
name: Upload homebrew formula | ||
needs: [pypi-publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger update of homebrew formula | ||
run: > | ||
curl -L -X POST | ||
-H "Accept: application/vnd.github+json" | ||
-H "Authorization: Bearer ${{ secrets.homebrew_pat }}" | ||
-H "X-GitHub-Api-Version: 2022-11-28" | ||
https://api.github.com/repos/nat-n/homebrew-poethepoet/actions/workflows/71211730/dispatches | ||
-d '{"ref":"main", "inputs":{}}' | ||
github-release: | ||
name: >- | ||
Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release | ||
needs: [pypi-publish] | ||
runs-on: ubuntu-latest | ||
|
||
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: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Upload artifact signatures to GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Upload to GitHub Release using the `gh` CLI. | ||
# `dist/` contains the built packages, and the | ||
# sigstore-produced signatures and certificates. | ||
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
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