Skip to content

Commit

Permalink
ci: simplify release process
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Jan 24, 2025
1 parent 835a80f commit 38c181c
Showing 1 changed file with 13 additions and 38 deletions.
51 changes: 13 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
name: Semantic Release

name: Publish to PyPI
on:
push:
branches:
- master

jobs:
release:
types: [published]
jobs:
pypi:
runs-on: ubuntu-latest
concurrency: release

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
build_command: pip install build && python -m build

merge-master-back-to-dev:
runs-on: ubuntu-latest
needs:
- release
steps:
- uses: actions/checkout@v2
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- name: Merge master back to dev
run: |
git fetch --unshallow
git checkout develop
git pull
git merge --no-ff master -m "chore: auto-merge master back to develop"
git push
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 38c181c

Please sign in to comment.