-
-
Notifications
You must be signed in to change notification settings - Fork 188
64 lines (55 loc) · 2.11 KB
/
Copy pathcalver-automation.yml
File metadata and controls
64 lines (55 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CalVer Automation
on:
push:
branches:
- main
- 'release/**' # Trigger on release branch pushes to update PR description
workflow_dispatch:
inputs:
dry-run:
description: 'Run in dry-run mode (no PR creation)'
type: boolean
default: false
env:
PYTHON_VERSION: '3.12'
jobs:
release-please:
runs-on: blacksmith-2vcpu-ubuntu-2404
if: github.repository_owner == 'wizarrrr'
permissions:
contents: write
pull-requests: write
outputs:
release-created: ${{ steps.release.outputs.release-created }}
tag-name: ${{ steps.release.outputs.tag-name }}
pr-number: ${{ steps.release.outputs.pr-number }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
fetch-depth: 0 # Need full history for changelog
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: pyproject.toml
- name: Generate CalVer Release
id: release
uses: ./.github/actions/calver-automation
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
dry-run: ${{ inputs.dry-run || 'false' }}
- name: Summary
if: steps.release.outputs.release-created == 'true'
run: |
echo "🚀 **Release PR Created!**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Version**: ${{ steps.release.outputs.tag-name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Release PR**: #${{ steps.release.outputs.pr-number }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Workflow" >> $GITHUB_STEP_SUMMARY
echo "1. **Review and merge Release PR** when ready" >> $GITHUB_STEP_SUMMARY
echo "2. **GitHub Release** created automatically" >> $GITHUB_STEP_SUMMARY
echo "3. **Docker images** built and pushed with :latest and version tags" >> $GITHUB_STEP_SUMMARY