Skip to content

Commit ac60fa6

Browse files
Merge pull request #16 from mindfiredigital/master
fix: update workflow
2 parents 270c9c5 + 982057b commit ac60fa6

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

.github/workflows/workflow.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,63 @@
1-
name: Upload Python Package
1+
name: Python Package Release
2+
23
on:
34
push:
45
branches:
56
- main
7+
workflow_dispatch:
8+
69
permissions:
710
contents: write
811
id-token: write
912
actions: write
1013
packages: write
14+
1115
jobs:
1216
release:
1317
runs-on: ubuntu-latest
18+
1419
steps:
15-
- name: Checkout main branch
20+
- name: Checkout code
1621
uses: actions/checkout@v4
1722
with:
1823
fetch-depth: 0
24+
1925
- name: Set up Python
2026
uses: actions/setup-python@v3
2127
with:
2228
python-version: "3.x"
29+
2330
- name: Install dependencies
2431
run: |
2532
python -m pip install --upgrade pip
2633
pip install build twine python-semantic-release setuptools-scm
27-
- name: Run semantic-release
34+
35+
- name: Configure Git for semantic-release
36+
run: |
37+
git config --local user.name "github-actions"
38+
git config --local user.email "github-actions@github.com"
39+
40+
- name: Run semantic-release (version & changelog)
2841
env:
2942
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3043
run: |
31-
git config user.name github-actions
32-
git config user.email github-actions@github.com
3344
semantic-release version
3445
semantic-release publish
35-
- name: Build package
46+
47+
- name: Build the package
3648
run: python -m build
37-
- name: Publish package to PyPI
49+
50+
- name: Publish to PyPI
3851
env:
3952
TWINE_USERNAME: __token__
4053
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
4154
run: twine upload dist/*
55+
56+
- name: Raise PR from main to master
57+
uses: peter-evans/create-pull-request@v5
58+
with:
59+
base: master
60+
head: main
61+
title: "Release PR: main → master"
62+
body: "Merges release changes from main into master"
63+
branch: pr-main-to-master

0 commit comments

Comments
 (0)