Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contributing: Generate ChangeLog in release workflow #2402

Merged
merged 4 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checks-out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -34,6 +36,12 @@ jobs:
git add core_modules_with_last_commit.json
git diff --cached > core_modules_with_last_commit.patch

- name: Generate ChangeLog file
run: |
sudo apt-get install -y gzip
python utils/gitlog2changelog.py
gzip ChangeLog

- name: Create new release draft (for tags only)
id: create_release
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -72,12 +80,24 @@ jobs:
asset_name: core_modules_with_last_commit.patch
asset_content_type: text/plain

- name: Upload ChangeLog file (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ChangeLog.gz
asset_name: ChangeLog.gz
asset_content_type: application/gzip

- name: Make the created files available
uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts
path: |
core_modules_with_last_commit.*
ChangeLog.gz
if-no-files-found: warn
retention-days: 10
22 changes: 10 additions & 12 deletions doc/howto_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,6 @@ If RC, mark it as a pre-release, check:

Save the modified draft, but do not publish the release yet.

## Changelog file for upload

There is also a large changelog file we produce and publish,
create it with a script (it takes several minutes to complete):

```bash
python3 utils/gitlog2changelog.py
mv ChangeLog ChangeLog_$VERSION
head ChangeLog_$VERSION
gzip ChangeLog_$VERSION
```

## Reset include/VERSION file to git development version

Use a dedicated script to edit the VERSION file.
Expand Down Expand Up @@ -259,6 +247,16 @@ git commit include/VERSION -m "version: Back to 8.2.0dev"
git push upstream
```

## Get changelog file for upload

There is also a large changelog file we produce and publish,
fetch the file from the release which was generated by a workflow
linked to the tag:

```bash
wget https://github.com/OSGeo/grass/releases/download/${VERSION}/ChangeLog.gz -O ChangeLog_${VERSION}.gz
```

## Get the source code tarball

Fetch a tarball from GitHub we also publish on OSGeo servers:
Expand Down