Skip to content

Commit

Permalink
MAINT: implement CD for ComPWA/actions@v1.3 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Mar 20, 2024
1 parent d2f1266 commit 0cc0607
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/compwa_policy/.github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,22 @@ jobs:
milestone:
if: startsWith(github.ref, 'refs/tags')
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v1
package-name:
uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v1
pypi:
environment:
name: PyPI
url: https://pypi.org/p/${{ needs.package-name.outputs.name }}
if: startsWith(github.ref, 'refs/tags')
secrets: inherit
uses: ComPWA/actions/.github/workflows/publish-to-pypi.yml@v1
name: Publish to PyPI
needs:
- package-name
permissions:
id-token: write
runs-on: ubuntu-22.04
steps:
- uses: ComPWA/actions/build-pypi-distribution@v1
- uses: pypa/gh-action-pypi-publish@release/v1
push:
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
secrets: inherit
Expand Down
1 change: 1 addition & 0 deletions src/compwa_policy/check_dev_files/github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def update() -> None:
workflow_path = CONFIG_PATH.github_workflow_dir / "cd.yml"
expected_data = yaml.load(COMPWA_POLICY_DIR / workflow_path)
if no_pypi or get_build_system() is None:
del expected_data["jobs"]["package-name"]
del expected_data["jobs"]["pypi"]
if no_version_branches:
del expected_data["jobs"]["push"]
Expand Down

0 comments on commit 0cc0607

Please sign in to comment.