Skip to content

Update GitHub Actions #194

Update GitHub Actions

Update GitHub Actions #194

Workflow file for this run

---
name: Test publishing packages
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
build_files: ${{ steps.filter.outputs.build_files }}
python_version: ${{ steps.python_version.outputs.content }}
steps:
- name: Look up Git repository in cache
uses: actions/cache/restore@v4
with:
path: .git/
key: test-publish-cache-git-${{ github.run_id }}
restore-keys: |
test-publish-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
build_files:
- '.github/workflows/test_publish.yml'
- '.github/workflows/template_publish.yml'
- '.github/workflows/template_publish_non_native.yml'
- '.github/workflows/template_publish_platform.yml'
- '.github/workflows/template_publish_pure.yml'
- 'build'
- 'build.bat'
- 'build_system/main.py'
- 'build_system/core/**'
- 'build_system/util/**'
- 'build_system/targets/paths.py'
- 'build_system/targets/packaging/*'
- name: Read Python version
uses: juliangruber/read-file-action@v1
id: python_version
with:
path: .version-python
- name: Save Git repository to cache
uses: actions/cache/save@v4
if: success() || failure()
with:
path: .git/
key: test-publish-cache-git-${{ github.run_id }}
test_release:
needs: changes
if: ${{ needs.changes.outputs.build_files == 'true' }}
name: Test publishing wheel packages
uses: ./.github/workflows/template_publish.yml
with:
python_version: ${{ needs.changes.outputs.python_version }}
check_success:
needs: test_release
if: ${{ always() && needs.changes.outputs.build_files == 'true' }}
name: Test publishing packages succeeded
runs-on: ubuntu-latest
steps:
- name: Check for success
run: |-
if [[ "${{ needs.test_release.result }}" == "failure" ]]; then
exit 1
fi