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

Overhaul release CI jobs to automate changelog #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Release
on:
push:
tags:
- v*
- v[0-9]+.[0-9]+.[0-9]+

jobs:
build-releases:
Expand Down Expand Up @@ -59,6 +59,8 @@ jobs:
needs: [build-releases]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Read info
id: tags
shell: bash
Expand All @@ -70,6 +72,10 @@ jobs:
- uses: actions/download-artifact@v2
with:
name: paru-aarch64
- name: Generate release changelog
run: |
sed -ne '/${{ steps.tags.outputs.tag }}/,/^## /{/^## /d;p}' CHANGELOG.md |
sed -e '1d;$d' > CHANGELOG-${{ steps.tags.outputs.tag }}.md
- name: Create Release
id: create_release
uses: actions/create-release@master
Expand All @@ -79,6 +85,7 @@ jobs:
tag_name: ${{ steps.tags.outputs.tag }}
release_name: ${{ steps.tags.outputs.tag }}
draft: true
body_path: CHANGELOG-${{ steps.tags.outputs.tag }}.md
prerelease: false
- name: Upload x86_64 asset
id: upload-release-asset-x86_64
Expand All @@ -99,4 +106,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./paru-aarch64.tar.zst
asset_name: paru-${{ steps.tags.outputs.tag }}-aarch64.tar.zst
asset_content_type: application/tar+zstd
asset_content_type: application/tar+zstd