-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup release process (#516)
* chore: convert bin/README to md * feat: replace all dates with bumpver * chore: date in README is now changed by `bumpver` * chore: clarify the RC workflow * chore: use global `/tmp` in RC * chore: slightly prettier description * chore: move changes file to env * chore: introduce release_tag workflow chore(wip): test trigger on PR chore(wip): add filtered diff chore(wip): switch to PATTERNS chore(wip): up to bumpver chore(wip): temporary disable check chore(wip): setup python chore(wip): test with a specific version chore(wip): test bumpver commit chore(wip): fix the bumpver usage chore: cleanup the release_tag workflow * chore: create draft release from CI * chore: update the docs * chore: provide details on the release process * chore: tiny header update * chore: remove commented-out code
- Loading branch information
1 parent
e542702
commit 4645f7b
Showing
8 changed files
with
288 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Release Tag workflow | ||
|
||
name: release_tag | ||
|
||
# Performed actions: | ||
# - [x] check that last commit is the CHANGES edit | ||
# - [x] infer the last RC version | ||
# - [x] run bumpver.py with the new version | ||
# - [x] push the commit and new tag | ||
|
||
on: | ||
workflow_dispatch: # on manual trigger | ||
|
||
jobs: | ||
new-tag: | ||
if: ${{ github.ref_name == 'master' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
CHANGES_FILE: CHANGES.rst | ||
EXPECTED_DIFF_COUNT: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- id: get-diff | ||
uses: technote-space/get-diff-action@v6 | ||
with: | ||
PATTERNS: | | ||
${{ env.CHANGES_FILE }} | ||
SET_ENV_NAME_COUNT: true | ||
|
||
- id: check-changes | ||
run: | | ||
echo "${{ steps.get-diff.outputs.count }}/${{ env.EXPECTED_DIFF_COUNT }} changes in ${{ env.CHANGES_FILE }}." | ||
exit ${{ steps.get-diff.outputs.count == env.EXPECTED_DIFF_COUNT && 0 || 1 }} | ||
- id: get-version | ||
run: | | ||
LAST_VERSION=$(grep -m1 -E ' \([0-9]+-[0-9]+-[0-9]+\)$' ${CHANGE_FILE} | awk '{ print $1 }') | ||
echo "LAST_VERSION=${LAST_VERSION}" >> "$GITHUB_OUTPUT" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- id: install-requirements | ||
run: pip install -r "requirements/dev.pip" | ||
|
||
- name: run `bumpver` | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
CHANGE_FILE=${{ env.CHANGES_FILE }} | ||
LAST_VERSION=${{ steps.get-version.outputs.LAST_VERSION }} | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
python3 bin/bumpver.py -t "Automated release ${LAST_VERSION}" ${LAST_VERSION} | ||
git push --follow-tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Build scripts folder | ||
|
||
## Highlight files | ||
|
||
- `bumpver.py` : Bump, commit and tag new project versions | ||
- `package.sh` : Build deployable artifact (wheel) in `/dist/` folder. | ||
|
||
## Fully manual release check-list | ||
|
||
1. Update `/CHANGES.rst` (+ Title + Date). | ||
|
||
2. Push to GitHub to run all TCs once more. | ||
|
||
3. Bump version: commit & tag it with `/bin/bumpver.py`. Use `--help`. | ||
> 💡 Read [PEP-440](https://www.python.org/dev/peps/pep-0440/) to decide the version. | ||
4. Push it in GitHub with `--follow-tags`. | ||
|
||
### Manually publishing a new package | ||
|
||
1. Generate package *wheel* with `/bin/package.sh`. | ||
|
||
2. Upload to PyPi with `twine upload -s -i <gpg-user> dist/*` | ||
|
||
3. Ensure that the new tag is built on | ||
[`hub.docker.com`](https://hub.docker.com/r/pypiserver/pypiserver) | ||
as `latest` and as a direct tag reference. | ||
|
||
4. Copy release notes from `/CHANGES.rst` in GitHub as new *"release"* | ||
page on the new tag. | ||
> 💡 Check syntactic differences between `.md` and `.rst` files. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.