Skip to content

Commit 61eda95

Browse files
Merge branch 'carl/initial-drop-from-internal--cicd' into carl/initial-drop-from-internal--docs
2 parents ef116f3 + 0aa8fe0 commit 61eda95

3 files changed

Lines changed: 82 additions & 25 deletions

File tree

.github/workflows/release-publish.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Publish Release
22

3-
# TODO: create a github release?
3+
# TODO: create a github release. This is needed to trigger webhooks.
44

55
permissions:
66
actions: read
@@ -113,26 +113,27 @@ jobs:
113113
# TODO: re-enable. Disabled for pipeline development
114114
# nox -s pkg_publish_pypi_prod
115115
116-
release-readthedocs:
117-
name: "Release documentation to readthedocs.com"
118-
# needs: release-checkpoint
119-
runs-on: ubuntu-latest
120-
# environment: production
121-
steps:
122-
- name: "Checkout code"
123-
uses: actions/checkout@v4
124-
- name: "Prepare common Python build environment"
125-
uses: ./.github/actions/python-build-env-setup
126-
with:
127-
python-version: ${{ env.PYTHON_VERSION }}
128-
- name: "Download Built Documentations"
129-
uses: actions/download-artifact@v4
130-
with:
131-
name: planet-auth-mkdocs-site
132-
# github-token: ${{ secrets.GH_PAT }}
133-
# repository: '${{ github.repository }}'
134-
# run-id: '${{ github.run_id }}'
135-
path: site
136-
- name: "Nox: Publish to ReadTheDocs"
137-
run: |
138-
nox -s mkdocs_publish_readthedocs
116+
# Read the docs is published via webhook GitHub webhook
117+
# release-readthedocs:
118+
# name: "Release documentation to readthedocs.com"
119+
# # needs: release-checkpoint
120+
# runs-on: ubuntu-latest
121+
# # environment: production
122+
# steps:
123+
# - name: "Checkout code"
124+
# uses: actions/checkout@v4
125+
# - name: "Prepare common Python build environment"
126+
# uses: ./.github/actions/python-build-env-setup
127+
# with:
128+
# python-version: ${{ env.PYTHON_VERSION }}
129+
# - name: "Download Built Documentations"
130+
# uses: actions/download-artifact@v4
131+
# with:
132+
# name: planet-auth-mkdocs-site
133+
# # github-token: ${{ secrets.GH_PAT }}
134+
# # repository: '${{ github.repository }}'
135+
# # run-id: '${{ github.run_id }}'
136+
# path: site
137+
# - name: "Nox: Publish to ReadTheDocs"
138+
# run: |
139+
# nox -s mkdocs_publish_readthedocs

RELEASE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Version Release
2+
3+
*Planet maintainers only*
4+
5+
Releasing consists of publishing new packages to PyPi and ReadTheDocs, and
6+
is automated using Github workflows, actions, and webhooks. Once initiated,
7+
the release orchestration pipeline will automatically take care of building,
8+
testing, tagging, and publishing the release.
9+
10+
## Versions and Stability
11+
12+
This library follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
13+
and therefore only major releases should break compatibility. Minor versions
14+
may include new functionality, and patch versions address bugs or trivial
15+
changes (like documentation).
16+
17+
## Release Workflow
18+
19+
The `main` branch is intended to be kept stable with the most up-to-date
20+
feature set, and should normally be the branch used for new feature releases.
21+
Patch branches may be necessary when the need to fix older versions arises.
22+
23+
To release a new version, complete the following steps:
24+
25+
1. Create a release branch off of `main` that bumps the version number in
26+
[version.txt](./version.txt), and updates the
27+
[changelog.md](./docs/changelog.md).
28+
2. Collect all features targeted for the intended release in the branch, and
29+
create a PR to merge the release branch into `main`.
30+
3. Ensure that all tests are passing on `main` branch after all merges.
31+
4. Determine the type of release that should be performed. This will be passed
32+
to the release workflow pipeline as the `build-variant` argument:
33+
* `release` - The final build for a new release version.
34+
* `rc` - A candidate for the final release.
35+
* `beta` - A beta release.
36+
* `alpha` - An alpha release
37+
* `dev` - A development release. This is the default.
38+
5. Initiate a release by activating the [Release Orchestration Workflow](./.github/workflows/release-orchestrate.yml) pipeline:
39+
* The release pipeline may be initiated in the GUI.
40+
* The release pipeline may be initiated by the `gh` CLI as follows:
41+
```bash
42+
gh workflow run .github/workflows/release-orchestrate.yml -f build-variant=_selected_release_variation_
43+
```
44+
45+
## Local Publishing
46+
47+
Most actions taken by the release pipeline are coded into the [noxfile.py](./noxfile.py),
48+
and so available for local execution. However, under normal circumstances
49+
releases should be driven by the CI/CD release pipeline and not performed
50+
locally. Local publishing skips the mechanism used to generate unique build
51+
numbers (which is not in the `noxfile.py`), and circumvents audit and review
52+
processes implemented by the CI/CD system and repository configuration.

noxfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,9 @@ def mkdocs_serve(session):
167167
@nox.session(python=_DEFAULT_PYTHON)
168168
def mkdocs_publish_readthedocs(session):
169169
session.install("-e", ".[build, docs]")
170-
# TODO
170+
# TODO - Manual doc publushing
171+
print(
172+
"ERROR: Read The Docs publishing not implemented in the noxfile."
173+
" Documentation publishing is triggered via GitHub webhook."
174+
)
171175
assert False

0 commit comments

Comments
 (0)