Skip to content

Commit

Permalink
chore: adjust workflow to accomodate env pypi settings change (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 6, 2024
1 parent affbe01 commit c422737
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/ci.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,15 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

release:
test_release:
needs:
- test
- lint
- commitlint

runs-on: ubuntu-latest
environment: release
environment: test_release
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -90,11 +87,30 @@ jobs:
with:
root_options: --noop

release:
needs:
- test
- lint
- commitlint

if: github.ref_name == 'main'
runs-on: ubuntu-latest
environment: pypi
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}

# On main branch: actual PSR + upload to PyPI & GitHub
- name: Release
uses: python-semantic-release/[email protected]
id: release
if: github.ref_name == 'main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit c422737

Please sign in to comment.