-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: trusted pub, Python 3.12 (#22)
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
116 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CD | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
dist: | ||
name: Distribution build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: hynek/build-and-inspect-python-package@v1 | ||
|
||
publish: | ||
name: Publish | ||
needs: [dist] | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
|
@@ -5,12 +5,7 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
release: | ||
types: | ||
- published | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -20,19 +15,13 @@ env: | |
FORCE_COLOR: 3 | ||
|
||
jobs: | ||
pre-commit: | ||
name: Format | ||
pylint: | ||
name: PyLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --hook-stage manual --all-files | ||
- name: Run PyLint | ||
run: | | ||
echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" | ||
|
@@ -41,11 +30,10 @@ jobs: | |
checks: | ||
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} | ||
runs-on: ${{ matrix.runs-on }} | ||
needs: [pre-commit] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.11"] | ||
python-version: ["3.8", "3.12"] | ||
runs-on: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
include: | ||
|
@@ -73,24 +61,10 @@ jobs: | |
dist: | ||
name: Distribution build | ||
runs-on: ubuntu-latest | ||
needs: [pre-commit] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build sdist and wheel | ||
run: pipx run build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist | ||
|
||
- name: Check products | ||
run: pipx run twine check dist/* | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
with: | ||
password: ${{ secrets.pypi_password }} | ||
- uses: hynek/build-and-inspect-python-package@v1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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