Skip to content

Commit fdecd43

Browse files
Workflow fixes
1 parent db9ebef commit fdecd43

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/manual_update_screenshots.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ jobs:
1111
screenshots_updating:
1212
runs-on: ubuntu-24.04
1313
steps:
14+
- name: Check branch
15+
run: |
16+
if [ "${{ github.ref_name }}" == "master" ]; then
17+
echo "This workflow is restricted to the 'master' branch."
18+
exit 1
19+
fi
20+
1421
- uses: actions/checkout@v4
1522
with:
1623
fetch-depth: 0
@@ -38,8 +45,9 @@ jobs:
3845
3946
- name: Commit changes
4047
run: |
48+
WORKFLOW_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
4149
git add .
42-
git commit -m "Screenshots updated for ${{ github.event.inputs.commit_sha }}" || echo "No changes to commit"
50+
git commit -m "Screenshots updated for ${{ github.event.inputs.commit_sha }}\nWorkflow run: $WORKFLOW_URL" || echo "No changes to commit"
4351
4452
- name: Set up Git for authentication
4553
run: |
@@ -48,3 +56,15 @@ jobs:
4856
- name: Push changes
4957
run: |
5058
git push origin ${{ github.ref }}
59+
60+
- name: Retrieve PR URL
61+
run: |
62+
PR_URL=$(curl -s -H "Authorization: token ${{ secrets.PAT }}" \
63+
"https://api.github.com/repos/${{ github.repository }}/pulls?head=${{ github.repository }}:${{ github.ref_name }}&state=open" | \
64+
jq -r '.[0].html_url')
65+
66+
if [ "$PR_URL" != "null" ]; then
67+
echo "PR URL: $PR_URL"
68+
else
69+
echo "No open PR found for this branch."
70+
fi

.github/workflows/publish-to-pypi.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
python-version: '3.8'
2222

2323
- name: Build package
24-
run: uv build
24+
run: |
25+
uv lock --upgrade-package mops
26+
uv build
2527
2628
- name: Publish package to PyPI
2729
run: |

mops/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = '3.0.0'
1+
__version__ = '3.0.1'
22
__project_name__ = 'mops'

0 commit comments

Comments
 (0)