Switch to simple upstream releases

This commit changes our release process from the model of having a
release commit (and pull request) which also updated the NEWS.md file
and bumped the versions in the osbuild.spec and setup.py files to simply
pushing a tag.

After the tag (containing the release notes) is pushed, a GitHub
composite action is triggered that creates a GitHub release with the
contents of the git release tag. Furthermore the bumping of the version
number now always has to happen directly after a release to avoid having
to push a(n untested) commit to main for the release and this is also
handled by the GitHub composite action.

Finally packit pushes directly to dist-git now on pushing the release
tag, so no pull-request needs to be reviewed and merged anymore.
This commit is contained in:
Simon Steinbeiss 2021-10-15 17:24:12 +02:00 committed by Christian Kellner
parent d76db390c8
commit 4ea2915ef7
6 changed files with 18 additions and 1296 deletions

15
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,15 @@
name: "Create GitHub release"
on:
push:
tags:
- "v[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Upstream release
uses: osbuild/release-action@main
with:
token: "${{ secrets.GITHUB_TOKEN }}"

View file

@ -14,6 +14,7 @@ upstream_tag_template: v{version}
actions:
get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'"
create_pr: false
jobs:
- job: copr_build
trigger: pull_request

View file

@ -296,63 +296,3 @@ bump-version:
sed -i "s|Version:\(\s*\)$(VERSION)|Version:\1$(NEXT_VERSION)|" osbuild.spec
sed -i "s|Release:\(\s*\)[[:digit:]]\+|Release:\11|" osbuild.spec
sed -i "s|version=\"$(VERSION)\"|version=\"$(NEXT_VERSION)\"|" setup.py
.PHONY: release
release:
@echo
@echo "Checklist for release of osbuild-$(NEXT_VERSION):"
@echo
@echo " * Create news entry in NEWS.md with a short description of"
@echo " any changes since the last release, which are relevant to"
@echo " users, packagers, distributors, or dependent projects."
@echo
@echo " Use the following template, break lines at 80ch:"
@echo
@echo "--------------------------------------------------------------------------------"
@echo "## CHANGES WITH $(NEXT_VERSION):"
@echo
@echo " * ..."
@echo
@echo " * ..."
@echo
@echo -n "Contributions from: "
# We omit the contributor list if `git log` fails. If you hit this,
# consider fetching missing tags via `git fetch --tags`, or just copy
# this command and remove the stderr-redirect.
@echo `( git log --format='%an, ' v$(VERSION)..HEAD 2>/dev/null | sort -u | tr -d '\n' | sed 's/, $$//' ) || echo`
@echo
@echo "— Location, YYYY-MM-DD"
@echo "--------------------------------------------------------------------------------"
@echo
@echo " To get a list of changes since the last release, you may use:"
@echo
@echo " git log v$(VERSION)..HEAD"
@echo
@echo " * Bump the project version. The canonical location is"
@echo " 'setup.py', but 'osbuild.spec' needs to be updated as well."
@echo " You can use the following make-target to automate this:"
@echo
@echo " make bump-version"
@echo
@echo " * Make sure the spec-file is updated for the new release and"
@echo " correctly supports all new features. This should already be"
@echo " done by previous commits that introduced the changes, but"
@echo " a sanity check does not hurt."
@echo
@echo " * Commit the version bump, spec-file changes and NEWS.md in any"
@echo " order you want."
@echo
@echo " * Tag the release via:"
@echo
@echo " git tag -s -m 'osbuild $(NEXT_VERSION)' v$(NEXT_VERSION) HEAD"
@echo
@echo " * Push main as well as the tag:"
@echo
@echo " git push origin main"
@echo " git push origin v$(NEXT_VERSION)"
@echo
@echo " * Create a release on github. Use 'NEWS.md' verbatim from the"
@echo " top until the end of the section for this release as release"
@echo " notes. Use 'v$(NEXT_VERSION)' as release name and as tag for"
@echo " the release."
@echo

1235
NEWS.md

File diff suppressed because it is too large Load diff

View file

@ -16,6 +16,7 @@ of the pipeline description, and more.
* **Website**: <https://www.osbuild.org>
* **Bug Tracker**: <https://github.com/osbuild/osbuild/issues>
* **IRC**: #osbuild on [Libera.Chat](https://libera.chat/)
* **Changelog**: <https://github.com/osbuild/osbuild/releases>
#### Contributing

View file

@ -175,7 +175,7 @@ exit 0
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md NEWS.md
%doc README.md
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%{python3_sitelib}/%{pypi_name}/