diff --git a/.github/workflows/test.yml b/.github/workflows/cicd.yaml similarity index 89% rename from .github/workflows/test.yml rename to .github/workflows/cicd.yaml index 4bbc4b23..007acff7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/cicd.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index fee31d41..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,20 +0,0 @@ - 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 }} diff --git a/dagfactory/__init__.py b/dagfactory/__init__.py index e1bfffd3..29ef06b9 100644 --- a/dagfactory/__init__.py +++ b/dagfactory/__init__.py @@ -2,7 +2,7 @@ from .dagfactory import DagFactory, load_yaml_dags -__version__ = "0.20.0a1" +__version__ = "0.20.0a2" __all__ = [ "DagFactory", "load_yaml_dags",