-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: restructure tagging to improve releasing.
Now tagging happens first and only then triggers the release.
- Loading branch information
Showing
2 changed files
with
86 additions
and
76 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
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,58 @@ | ||
name: Create Release Tag | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
jobs: | ||
determine-release: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
env: | ||
UV_TOOL_DIR: /tmp/.uv-tool | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.sha }} | ||
ssh-key: ${{ secrets.GH_DEPLOY_SSH_KEY }} | ||
|
||
- name: Force correct release branch | ||
run: | | ||
git checkout -B ${{ github.ref_name }} ${{ github.sha }} | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
tool-bin-dir: "/tmp/tool-bin" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "backend/pyproject.toml" | ||
|
||
- name: Restore uv tools | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/tool-bin | ||
key: uv-tools-${{ runner.os }}-psr-v9.11.1 | ||
restore-keys: | | ||
uv-tools-${{ runner.os }}-psr-v9.11.1 | ||
uv-tools-${{ runner.os }} | ||
- name: Install Python Semantic Release | ||
env: | ||
UV_TOOL_DIR: /tmp/release-tool-bin | ||
run: uv tool install python-semantic-release@v9.11.1 | ||
|
||
- name: Run Semantic Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./scripts/release-needed.sh |