@@ -49,10 +49,60 @@ jobs:
4949 - name : Test with Pytest
5050 run : uv run pytest --log-cli-level=DEBUG -vv -s
5151 shell : bash
52+
53+ build :
54+ name : Build Package
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/checkout@v5
58+ - name : Set up uv
59+ uses : astral-sh/setup-uv@v7
60+ with :
61+ python-version : " 3.11"
62+ activate-environment : true
63+ - name : Build package
64+ run : uv build
65+
66+ # Test semantic-release configuration on PR branches
67+ test-release :
68+ name : Test Semantic Release
69+ runs-on : ubuntu-latest
70+ if : github.event_name == 'pull_request'
71+ steps :
72+ - uses : actions/checkout@v5
73+ with :
74+ fetch-depth : 0
75+ - name : Setup Git for Semantic Release Testing
76+ run : |
77+ # Setup a temp branch to test
78+ git checkout -B temp-main-branch
79+ git merge ${{ github.event.pull_request.head.sha }} --no-edit
80+ git config user.name "GitHub Actions"
81+ git config user.email "actions@github.com"
82+ - name : Test Semantic Release (No-op)
83+ id : test-release
84+ uses : python-semantic-release/python-semantic-release@v10.4.1
85+ with :
86+ github_token : ${{ secrets.GITHUB_TOKEN }}
87+ changelog : true
88+ # Use noop mode to test without making changes
89+ no_operation_mode : true
90+ - name : Test Semantic Release (Dry Run)
91+ id : test-release-dry
92+ uses : python-semantic-release/python-semantic-release@v10.4.1
93+ with :
94+ github_token : ${{ secrets.GITHUB_TOKEN }}
95+ changelog : true
96+ # Use dry run mode to test without committing
97+ commit : false
98+ tag : false
99+ push : false
100+ vcs_release : false
52101 release :
53102 runs-on : ubuntu-latest
54103 needs :
55104 - test
105+ - build
56106 concurrency : release
57107 if : github.ref == 'refs/heads/main'
58108 permissions :
@@ -70,6 +120,10 @@ jobs:
70120 with :
71121 fetch-depth : 0
72122 persist-credentials : false
123+ - name : Set up uv
124+ uses : astral-sh/setup-uv@v7
125+ with :
126+ python-version : " 3.11"
73127 - name : Python Semantic Release
74128 id : release
75129 uses : python-semantic-release/python-semantic-release@v10.4.1
0 commit comments