Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjust workflow to accomodate env pypi settings change #37

Merged
merged 4 commits into from
Jan 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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