Skip to content

Commit

Permalink
ci: use python-semantic-release official actions
Browse files Browse the repository at this point in the history
  • Loading branch information
siemdejong committed Oct 1, 2024
1 parent 636850b commit bbfa77f
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ jobs:
with:
fetch-depth: 0
submodules: true
ref: ${{ github.sha }}

- name: Setup | Force correct release branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}

- uses: actions/download-artifact@v4
with:
Expand All @@ -133,14 +137,14 @@ jobs:
- name: Install build
run: pip install build

- name: Use Python Semantic Release to prepare release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install python-semantic-release
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release publish
- name: Action | Semantic Version Release
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@v9.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"

- name: Remove executable bundles
run:
Expand Down Expand Up @@ -169,3 +173,10 @@ jobs:
- name: Test install from PyPI
run: |
pip install shithappens --force-reinstall
- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@v9.9.0
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}

0 comments on commit bbfa77f

Please sign in to comment.