Skip to content

Commit

Permalink
actions: refresh workflows
Browse files Browse the repository at this point in the history
- fix release workflow (cannot use shared workflow with pypi trusted
  publisher)
- drop pip-compile workflows, replaced by renovate
  • Loading branch information
rohanpm committed Oct 3, 2024
1 parent a8dfc51 commit 1439c37
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/pip-compile-submit.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/pip-compile.yml

This file was deleted.

41 changes: 38 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,44 @@ jobs:
uses: ./.github/workflows/tox.yml

pypi-publish:
name: Upload release to PyPI
needs: [tests]
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/buildsys-dateversion
permissions:
id-token: write
uses: rohanpm/workflows/.github/workflows/pypi-release.yml@main
with:
name: buildsys-dateversion
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install -U pip
pip install build
- name: Build distribution
run: |
python -mbuild
- name: Prepare for wheel check
run: |
pip download --no-deps --only-binary :all: --implementation py --platform none buildsys-dateversion
pip install .
- name: Check if wheel content changed
id: wheeldiff
run: |
set +e
set -x
wheeldiff --ignore version,record buildsys_dateversion-*.whl dist/buildsys_dateversion-*.whl
echo "diff=$?" >> "$GITHUB_OUTPUT"
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.wheeldiff.outputs.diff == '2'

0 comments on commit 1439c37

Please sign in to comment.