Skip to content

Commit

Permalink
gh-actions: reorganize github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Jul 16, 2024
1 parent 83e623f commit 5455a63
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and publish package
name: Publish to pypi

on:
workflow_call:
workflow_call:

jobs:
publish:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ on:
push:
branches:
- master
tags-ignore:
- "**"

jobs:
python2_tests:
uses: ./.github/workflows/test-python-2.yml

python3_tests:
uses: ./.github/workflows/test-python-3.yml

bump_version:
needs: [python2_tests, python3_tests]
uses: ./.github/workflows/bump.yml
secrets:
PAT: ${{ secrets.INSPIRE_BOT_TOKEN }}

publish_package:
needs: bump_version
uses: ./.github/workflows/build-and-publish.yml
16 changes: 16 additions & 0 deletions .github/workflows/push-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish package

on:
push:
tags:
- "*"
jobs:
python2_tests:
uses: ./.github/workflows/test-python-2.yml

python3_tests:
uses: ./.github/workflows/test-python-3.yml

publish_package:
needs: [python2_tests, python3_tests]
uses: ./.github/workflows/publish.yml
2 changes: 1 addition & 1 deletion .github/workflows/test-python-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
python3 --version
pip freeze
- name: Run tests
run: |
./run-tests.sh

0 comments on commit 5455a63

Please sign in to comment.