@@ -14,8 +14,9 @@ name: Publish to PyPi
1414# 3. Bump package version and generate latest Changelog
1515# 4. Publish package to PyPi test and prod repository
1616# 5. Kick off SAR App pipeline to publish latest version with minimal and extra dependencies
17- # 6. Builds a new user guide and API docs with release version; update /latest pointing to newly released version
18- # 7. Close all issues labeled "pending-release" and notify customers about the release
17+ # 6. Builds and publish latest changelog from tip of the branch
18+ # 7. Builds a new user guide and API docs with release version; update /latest pointing to newly released version
19+ # 8. Close all issues labeled "pending-release" and notify customers about the release
1920
2021# See MAINTAINERS.md "Releasing a new version" for release mechanisms
2122
3334 default : false
3435 type : boolean
3536 required : false
37+ skip_code_quality :
38+ description : " Skip tests, linting, and baseline. Only use if release fail for reasons beyond our control and you need a quick release."
39+ default : false
40+ type : boolean
41+ required : false
3642
3743jobs :
3844 release :
6672 - name : Install dependencies
6773 run : make dev
6874 - name : Run all tests, linting and baselines
69- if : ${{ !inputs.skip_pypi }}
75+ if : ${{ !inputs.skip_code_quality }}
7076 run : make pr
7177 - name : Bump package version
7278 run : poetry version ${RELEASE_VERSION}
@@ -95,8 +101,17 @@ jobs:
95101 aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_VERSION --overwrite
96102 aws codepipeline start-pipeline-execution --name ${{ secrets.AWS_SAR_PIPELINE_NAME }}
97103
98- docs :
104+ changelog :
99105 needs : release
106+ permissions :
107+ contents : write
108+ uses : ./.github/workflows/reusable_publish_changelog.yml
109+
110+ docs :
111+ needs : [release, changelog]
112+ permissions :
113+ contents : write
114+ pages : write
100115 runs-on : ubuntu-latest
101116 env :
102117 RELEASE_VERSION : ${{ needs.release.outputs.RELEASE_VERSION }}
@@ -138,6 +153,11 @@ jobs:
138153
139154 post_release :
140155 needs : release
156+ permissions :
157+ contents : read
158+ issues : write
159+ discussions : write
160+ pull-requests : write
141161 runs-on : ubuntu-latest
142162 env :
143163 RELEASE_VERSION : ${{ needs.release.outputs.RELEASE_VERSION }}
0 commit comments