forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release workflow update (acts-project#318)
- Remove a bunch of old stuff and scripts we don't need anymore - New updated release helper script in `CI/release.py` - Can make a release branch, bump version and push, both for fix and minor releases. - Can make release notes from milestone and tag name (I've been using this for the releases so far on Github) - Workflow file with a manual trigger to run exactly this. Once this is merged into master, we can manually trigger this workflow with a desired tag name. The script will figure out what to do (either create a new release branch, bump and tag there, or use existing release branch), make a release, create release notes and close the milestone. I tried to make it assert as much as possible to prevent any data corruption, but the entire process is not a transaction. If for whatever reason it fails midway, manual cleanup is required. Anyway I think this might help automate this more. I tested this on my fork, and in the tests it seemed to work fine. I think anyone with write access will be able to trigger the workflow, and thus make a new release. Co-authored-by: robertlangenberg <[email protected]>
- Loading branch information
1 parent
8c1280e
commit d6c7ac9
Showing
17 changed files
with
772 additions
and
1,488 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag to create' | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
container: python:3.8-alpine | ||
steps: | ||
- name: Git setup | ||
run: | | ||
apk add git | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: "clone" | ||
- name: Setup | ||
run: | | ||
cp -r clone/CI . | ||
pip install -r CI/requirements.txt | ||
- name: Make release | ||
run: | | ||
export TAG_NAME=${{ github.event.inputs.tag }} | ||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
cd clone | ||
../CI/release.py tag $TAG_NAME --yes | ||
../CI/release.py notes $TAG_NAME --yes | ||
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,11 @@ | ||
# CI instructions | ||
|
||
This directory comntains scripts and other files relating to the CI. | ||
|
||
## Use poetry to manage requirements | ||
|
||
Since [`poetry`](https://python-poetry.org) supports more robust dependency locking than `pip` this is used for dependency tracking. The authoritative files are `pyproject.toml` which defines the primary dependencies, and `poetry.lock` which defines the full locked dependencies. This can be exported to a `requirements.txt` file via | ||
|
||
```console | ||
poetry export -f requirements.txt > requirements.txt | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.