-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (91 loc) · 3.02 KB
/
release.yml
File metadata and controls
97 lines (91 loc) · 3.02 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Production Release
# This workflow calls the centralized release process from the template project
name: release
on:
push:
branches:
- master
paths:
- .github/tag_and_release/release-**
workflow_dispatch:
inputs:
level:
description: 'Release level'
required: false
default: 'auto'
type: choice
options:
- auto
- patch
- minor
- major
python:
description: 'Python package release'
required: false
default: 'auto'
type: choice
options:
- auto
- force
- skip
docs:
description: 'Documentation versioning'
required: false
default: 'auto'
type: choice
options:
- auto
- force
- skip
permissions:
contents: write
packages: write
id-token: write
concurrency:
group: release-${{ github.ref_name }}
cancel-in-progress: false
jobs:
# Call the centralized complete release workflow
release:
name: Complete Release Process
uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_release_complete.yaml@master
with:
level: ${{ inputs.level }}
python: ${{ inputs.python }}
docs: ${{ inputs.docs }}
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
# Summary job to report results
release-summary:
name: Release Summary
runs-on: ubuntu-latest
needs: release
if: always()
steps:
- name: Report release results
run: |
echo "=== Production Release Summary ==="
echo ""
echo "Release Status: ${{ needs.release.result }}"
echo "Version Released: ${{ needs.release.outputs.version }}"
echo "Release Performed: ${{ needs.release.outputs.release_performed }}"
echo "Python Released: ${{ needs.release.outputs.python_released }}"
echo "Docs Released: ${{ needs.release.outputs.docs_released }}"
echo ""
if [[ "${{ needs.release.result }}" == "success" && "${{ needs.release.outputs.release_performed }}" == "true" ]]; then
echo "🎉 Production release completed successfully!"
echo ""
echo "📦 Released Artifacts:"
if [[ "${{ needs.release.outputs.python_released }}" == "true" ]]; then
echo "- Python Package: https://pypi.org/project/${{ github.repository_owner }}/${{ needs.release.outputs.version }}/"
fi
if [[ "${{ needs.release.outputs.docs_released }}" == "true" ]]; then
echo "- Documentation: Versioned documentation deployed"
fi
elif [[ "${{ needs.release.outputs.release_performed }}" == "false" ]]; then
echo "ℹ️ No release was performed (intent evaluation determined no release needed)"
else
echo "❌ Release process failed. Check the workflow logs above."
exit 1
fi