Skip to content

Commit

Permalink
Fix release action and overall CI jobs dependencies (#261)
Browse files Browse the repository at this point in the history
Fix issue related to publishing PyPI package, created by #255

Remove the "Authorize" job since we don't have any expensive/sensitive
third-party services that justify maintainers having to approve CI
running for external contributors. We can revisit this as the project
evolves.
  • Loading branch information
tatiana authored Oct 17, 2024
1 parent b677111 commit cbc705e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 29 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/test.yml → .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: test
name: Test and release related jobs

on:
push: # Run on pushes to the default branch
branches: [main]
pull_request_target: # Also run on pull requests originated from forks
branches: [main]
release:
types: ['published']

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Authorize:
environment: ${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true

Static-Check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -140,3 +135,24 @@ jobs:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml

Publish-Package:
if: github.event_name == 'release'
name: Build and publish Python 🐍 distributions 📦 to PyPI
needs:
- Static-Check
- Run-Unit-Tests
- Code-Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- run: pip3 install hatch
- run: hatch build
- run: hatch publish
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion dagfactory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .dagfactory import DagFactory, load_yaml_dags

__version__ = "0.20.0a1"
__version__ = "0.20.0a2"
__all__ = [
"DagFactory",
"load_yaml_dags",
Expand Down

0 comments on commit cbc705e

Please sign in to comment.