|
1 | | -name: Publish to PyPi |
| 1 | +name: Release |
2 | 2 |
|
3 | 3 | # RELEASE PROCESS |
4 | 4 | # |
| 5 | +# === Automated activities === |
| 6 | +# |
| 7 | +# 1. Run tests, linting, security and complexity base line |
| 8 | +# 2. Bump package version and generate latest Changelog |
| 9 | +# 3. Publish package to PyPi test and prod repository |
| 10 | +# 4. Kick off SAR App pipeline to publish latest version with minimal and extra dependencies |
| 11 | +# 5. Builds and publish latest changelog from tip of the branch |
| 12 | +# 6. Builds a new user guide and API docs with release version; update /latest pointing to newly released version |
| 13 | +# 7. Close all issues labeled "pending-release" and notify customers about the release |
| 14 | +# |
5 | 15 | # === Manual activities === |
6 | 16 | # |
7 | 17 | # 1. Edit the current draft release notes |
8 | 18 | # 2. If not already set, use `v<new version>` as a tag, e.g., v1.26.4, and select develop as target branch |
9 | | -# |
10 | | -# === Automated activities === |
11 | | -# |
12 | | -# 1. Extract release notes tag that was published |
13 | | -# 2. Run tests, linting, security and complexity base line |
14 | | -# 3. Bump package version and generate latest Changelog |
15 | | -# 4. Publish package to PyPi test and prod repository |
16 | | -# 5. Kick off SAR App pipeline to publish latest version with minimal and extra dependencies |
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 |
20 | 19 |
|
21 | 20 | # See MAINTAINERS.md "Releasing a new version" for release mechanisms |
22 | 21 |
|
23 | 22 | env: |
24 | 23 | BRANCH: develop |
25 | 24 |
|
26 | 25 | on: |
27 | | - release: |
28 | | - # We can't filter by tag here, so we filter later on the first job |
29 | | - types: [published] |
30 | | - |
31 | 26 | workflow_dispatch: |
32 | 27 | inputs: |
33 | 28 | version_to_publish: |
|
44 | 39 | default: false |
45 | 40 | type: boolean |
46 | 41 | required: false |
47 | | - # Only use this until v1 is completely dropped, and for manual releases |
48 | | - skip_version_guard: |
49 | | - description: "Skips conditions to prevent v1 into v2 releases" |
50 | | - default: false |
51 | | - type: boolean |
52 | | - required: false |
53 | 42 | pre_release: |
54 | 43 | description: "Publishes documentation using a pre-release tag (v2.0.0a0). You are still responsible for passing a pre-release version tag to the workflow." |
55 | 44 | default: false |
|
58 | 47 |
|
59 | 48 | jobs: |
60 | 49 | release: |
61 | | - if: ${{ startsWith(github.ref, 'refs/tags/v2') || inputs.skip_version_guard }} |
62 | 50 | environment: release |
63 | 51 | runs-on: ubuntu-latest |
64 | 52 | permissions: |
65 | 53 | contents: read |
66 | 54 | outputs: |
67 | 55 | RELEASE_VERSION: ${{ steps.release_version.outputs.RELEASE_VERSION }} |
68 | 56 | env: |
69 | | - RELEASE_TAG_VERSION: ${{ github.event.release.tag_name || inputs.version_to_publish }} |
| 57 | + RELEASE_TAG_VERSION: ${{ inputs.version_to_publish }} |
70 | 58 | steps: |
71 | 59 | - uses: actions/checkout@v3 |
72 | 60 | with: |
|
76 | 64 | - name: Set up Python |
77 | 65 | uses: actions/setup-python@v4 |
78 | 66 | with: |
79 | | - python-version: "3.8" |
| 67 | + python-version: "3.9" |
80 | 68 | cache: "poetry" |
81 | 69 | - name: Set release notes tag |
82 | 70 | id: release_version |
@@ -128,7 +116,7 @@ jobs: |
128 | 116 | uses: ./.github/workflows/publish_v2_layer.yml |
129 | 117 | with: |
130 | 118 | latest_published_version: ${{ needs.release.outputs.RELEASE_VERSION }} |
131 | | - pre_release: ${{ github.event.release.prerelease || inputs.pre_release }} |
| 119 | + pre_release: ${{ inputs.pre_release }} |
132 | 120 |
|
133 | 121 | post_release: |
134 | 122 | needs: [release, publish_layer] |
|
0 commit comments