@@ -33,23 +33,12 @@ name: Publish to PyPi
33
33
#
34
34
# === Documentation hotfix ===
35
35
#
36
- # 1. Trigger "Publish to PyPi" workflow manually: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
37
- # 2. Use the latest version released under Releases e.g. v1.21.1
38
- # 3. Set `Build and publish docs only` field to `true`
36
+ # Look for rebuild latest docs workflow
39
37
40
38
41
39
on :
42
40
release :
43
41
types : [published]
44
- workflow_dispatch :
45
- inputs :
46
- publish_version :
47
- description : ' Version to publish, e.g. v1.13.0'
48
- required : true
49
- publish_docs_only :
50
- description : ' Build and publish docs only'
51
- required : false
52
- default : ' false'
53
42
54
43
jobs :
55
44
release :
@@ -65,40 +54,33 @@ jobs:
65
54
- name : Set release notes tag
66
55
run : |
67
56
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
68
- # Replace publishing version if the workflow was triggered manually
69
- # test -n ${RELEASE_TAG_VERSION} && RELEASE_TAG_VERSION=${{ github.event.inputs.publish_version }}
70
57
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
71
58
- name : Ensure new version is also set in pyproject and CHANGELOG
72
- if : ${{ github.event.inputs.publish_docs_only == false }}
73
59
run : |
74
60
grep --regexp "${RELEASE_TAG_VERSION}" CHANGELOG.md
75
61
grep --regexp "version \= \"${RELEASE_TAG_VERSION}\"" pyproject.toml
76
62
- name : Install dependencies
77
63
run : make dev
78
64
- name : Run all tests, linting and baselines
79
- if : ${{ github.event.inputs.publish_docs_only == false }}
80
65
run : make pr
81
66
- name : Build python package and wheel
82
- if : ${{ github.event.inputs.publish_docs_only == false }}
83
67
run : poetry build
84
68
- name : Upload to PyPi test
85
- if : ${{ github.event.inputs.publish_docs_only == false }}
86
69
run : make release-test
87
70
env :
88
71
PYPI_USERNAME : __token__
89
72
PYPI_TEST_TOKEN : ${{ secrets.PYPI_TEST_TOKEN }}
90
73
- name : Upload to PyPi prod
91
- if : ${{ github.event.inputs.publish_docs_only == false }}
92
74
run : make release-prod
93
75
env :
94
76
PYPI_USERNAME : __token__
95
77
PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
96
78
- name : publish lambda layer in SAR by triggering the internal codepipeline
97
- if : ${{ github.event.inputs.publish_docs_only == false }}
98
79
run : |
99
80
aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite
100
81
aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }}
101
82
env :
83
+ # Maintenance: Migrate to new OAuth mechanism
102
84
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
103
85
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
104
86
AWS_DEFAULT_REGION : eu-west-1
@@ -129,7 +111,6 @@ jobs:
129
111
sync_master :
130
112
needs : release
131
113
runs-on : ubuntu-latest
132
- if : ${{ github.event.inputs.publish_docs_only == false }}
133
114
steps :
134
115
- uses : actions/checkout@v2
135
116
- name : Sync master from detached head
0 commit comments