Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run test publish workflow on push to release/ branches #594

Merged
merged 6 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
name: Publish on Test PyPI and PyPI
name: Publish on (Test) PyPI

on:
pull_request:
push:
# Commits pushed to release/ branches are published on Test PyPI
# if they have a new version number.
# If the version is the same, the worflow will still complete successfully,
# but the already published version on Test PyPI will not be updated.
branches:
# Commits pushed to release/ branches are published on Test PyPI if they
# have a new version number. This allows the maintainer to check the release
# before it is pushed to the actual PyPI index.
- release/**
- 'release/**'
release:
types: [published]

jobs:

build:

name: Build package
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -46,7 +48,7 @@ jobs:

publish-test:

name: Build and publish on TestPyPI
name: Publish on TestPyPI
if: github.repository_owner == 'aiidalab'

needs: [build]
Expand All @@ -73,7 +75,7 @@ jobs:

publish:

name: Build and publish on PyPI
name: Publish on PyPI
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'aiidalab'

needs: [build, publish-test]
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repos:
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--preserve-quotes]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- repo: https://github.com/sirosen/check-jsonschema
rev: 0.28.1
Expand Down
Loading