-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from ImperialCollegeLondon/semantic-versionin…
…g-pr-worflow Replace auto publishing with workflow to create an rc PR
- Loading branch information
Showing
2 changed files
with
52 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Create Release Candidate" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-rc: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history | ||
fetch-tags: true # Fetch all tags | ||
ref: ${{ github.head_ref || github.ref_name }} # Correct branch reference | ||
|
||
- name: Install uv & dependencies | ||
uses: astral-sh/setup-uv@v5 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
|
||
- name: Install project | ||
run: | | ||
uv sync --all-extras --group format --group test --group docs --group external-integration | ||
- name: Bump version | ||
id: bump | ||
run: | | ||
uv run semantic-release version --no-commit --no-tag --skip-build | ||
VERSION=$(grep -o '".*"' pyprobe/_version.py | sed 's/"//g') | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Update uv lockfile | ||
run: uv lock --upgrade-package pyprobe-data | ||
|
||
- name: Open Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
branch: release-candidates/rc-${{ steps.bump.outputs.version }} | ||
title: "Release Candidate ${{ steps.bump.outputs.version }}" | ||
commit-message: "chore: release candidate ${{ steps.bump.outputs.version }} [skip ci]" | ||
base: main | ||
body: "This PR is the release candidate for version ${{ steps.bump.outputs.version }}." |
This file was deleted.
Oops, something went wrong.