Skip to content

Commit

Permalink
ci: Use hynek/build-and-inspect-python-package (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 2, 2024
1 parent e0fda9d commit 45e1fdd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ updates:
- "edgarrmondragon"
commit-message:
prefix: "ci: "
groups:
actions:
patterns:
- "*"
44 changes: 14 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,30 @@
name: Publish with Dynamic Versioning
name: Build

on:
release:
types: [published]
push:

permissions:
contents: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: publishing
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4.7.1
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
python-version: "3.10"

- name: Upgrade pip
run: |
pip install pip
pip --version
- name: Install Poetry
run: |
pipx install poetry
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
- name: Build
run: poetry build

name: Packages
path: dist
- name: Upload wheel to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down

0 comments on commit 45e1fdd

Please sign in to comment.