summaryrefslogtreecommitdiff
path: root/.github/workflows/generate_release.yml
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-09-11 13:46:58 +0800
committertranch <tranch.xiao@gmail.com>2026-09-11 13:46:58 +0800
commit621e87de23348a337d45643b3682b7b3cb00000c (patch)
tree6e492ea233a8d9f098bddfe6e190240cb23bec89 /.github/workflows/generate_release.yml
parentc18aff5d552f359386736aea68a0ac9541cc5820 (diff)
downloadAeroCore-OS-621e87de23348a337d45643b3682b7b3cb00000c.tar.gz
AeroCore-OS-621e87de23348a337d45643b3682b7b3cb00000c.zip
Generate release package changelogstesting-44.20260911.1
Attach RPM SBOMs to published image digests and build release notes by comparing the current and previous SBOM artifacts.
Diffstat (limited to '.github/workflows/generate_release.yml')
-rw-r--r--.github/workflows/generate_release.yml35
1 files changed, 32 insertions, 3 deletions
diff --git a/.github/workflows/generate_release.yml b/.github/workflows/generate_release.yml
index 8ea1f54..3cc432d 100644
--- a/.github/workflows/generate_release.yml
+++ b/.github/workflows/generate_release.yml
@@ -26,12 +26,28 @@ jobs:
runs-on: ubuntu-24.04
permissions:
contents: write
+ packages: read
steps:
- uses: actions/checkout@v7.0.1
with:
- fetch-depth: 50
+ fetch-depth: 0
+
+ - name: Install ORAS
+ uses: oras-project/setup-oras@1d808f7d7f6995cc68b7bf507bfe5c5446e1dc9d # v2.0.1
+
+ - name: Log in to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Log in to GHCR with ORAS
+ env:
+ GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: echo "${GHCR_TOKEN}" | oras login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
- name: Align release tag with build commit
env:
@@ -50,12 +66,25 @@ jobs:
[[ "${target}" == "main" ]] && target="stable"
echo "target=${target}" >> "$GITHUB_OUTPUT"
+ - name: Generate package and commit changelog
+ env:
+ IMAGE: ghcr.io/${{ github.repository }}
+ RELEASE_TAG: ${{ inputs.release_tag }}
+ HANDWRITTEN: ${{ inputs.handwritten }}
+ run: |
+ python3 .github/scripts/generate_changelog.py \
+ --image "${IMAGE,,}" \
+ --repository "${GITHUB_REPOSITORY}" \
+ --current "${RELEASE_TAG}" \
+ --channel "${{ steps.target.outputs.target }}" \
+ --handwritten "${HANDWRITTEN}" \
+ --output release-notes.md
+
- name: Generate release
uses: softprops/action-gh-release@v3.0.2
with:
tag_name: "${{ inputs.release_tag }}"
name: "${{ inputs.release_tag }}"
- body: |
- ${{ inputs.handwritten }}
+ body_path: release-notes.md
prerelease: ${{ steps.target.outputs.target != 'stable' }}
make_latest: ${{ steps.target.outputs.target == 'stable' }}