Skip to content

Commit

Permalink
chore(release): remove automated release
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Apr 21, 2022
1 parent 193eb94 commit bc0d3bd
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 60 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PyPI

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/cache@v2
with:
path: .venv
key: poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
poetry-
- name: Install dependencies
run: |
python -m pip install -U poetry twine
poetry config virtualenvs.in-project true
poetry install
- name: Build package
run: poetry build
- name: Upload to PyPI
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_NON_INTERACTIVE: true
46 changes: 0 additions & 46 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Changelog

<!--next-version-placeholder-->

## v0.5.0 (2022-03-03)

### Breaking
Expand Down
22 changes: 17 additions & 5 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@

## Make a new release

We're using `python-semantic-release` to generate a changelog, update the
version and publish it to Github and PyPi.
We're using `python-semantic-release` to generate a changelog and suggest the next version.

To release a new version simply head over to [Github
Actions](https://github.com/adfinis-sygroup/ebau-gwr/actions/workflows/release.yml)
and trigger the workflow dispatch event on the branch `main`.
1. Checkout `main` branch, ensure you have all tags
2. Figure out the next version
3. Update code (CHANGELOG, version info)
4. Pull Request with the version bump.
5. Create tag and release on the merge commit with the changelog


```bash
# Ensure you're on the current master and have all release tags
git checkout main
git pull origin --tags
# Figure out the next version
poetry run semantic-release version --noop
# Prepare changelog
poetry run semantic-release changelog --noop --unreleased
```
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,8 @@ omit = [
show_missing = true

[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
branch = "main"
version_source = "tag"
major_on_zero = false
upload_to_repository = true
upload_to_release = true
build_command = "poetry build"
commit_subject = "chore(release): v{version}"
commit_author = "github-actions <[email protected]>"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit bc0d3bd

Please sign in to comment.