Skip to content

Commit 38c181c

Browse files
committed
ci: simplify release process
1 parent 835a80f commit 38c181c

File tree

1 file changed

+13
-38
lines changed

1 file changed

+13
-38
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,17 @@
1-
name: Semantic Release
2-
1+
name: Publish to PyPI
32
on:
4-
push:
5-
branches:
6-
- master
7-
8-
jobs:
93
release:
4+
types: [published]
5+
jobs:
6+
pypi:
107
runs-on: ubuntu-latest
11-
concurrency: release
12-
13-
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
17-
18-
- name: Python Semantic Release
19-
uses: relekang/[email protected]
20-
with:
21-
github_token: ${{ secrets.GITHUB_TOKEN }}
22-
repository_username: __token__
23-
repository_password: ${{ secrets.PYPI_TOKEN }}
24-
build_command: pip install build && python -m build
25-
26-
merge-master-back-to-dev:
27-
runs-on: ubuntu-latest
28-
needs:
29-
- release
308
steps:
31-
- uses: actions/checkout@v2
32-
- name: Set Git config
33-
run: |
34-
git config --local user.email "[email protected]"
35-
git config --local user.name "Github Actions"
36-
- name: Merge master back to dev
37-
run: |
38-
git fetch --unshallow
39-
git checkout develop
40-
git pull
41-
git merge --no-ff master -m "chore: auto-merge master back to develop"
42-
git push
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- run: python3 -m pip install --upgrade build && python3 -m build
14+
- name: Publish package
15+
uses: pypa/gh-action-pypi-publish@release/v1
16+
with:
17+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)