diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
| commit | 796c6c8a70c92d4675df7c2ec2d25ecda139d723 (patch) | |
| tree | 06c6d3e7788d7b2ad5ddd0565e2651c0c8d9d151 /.github/workflows/generate_release.yml | |
| parent | ab070aec5f1d760a2539e14cb19da61593bded15 (diff) | |
| parent | d734f2c746632772b794143762f2fcea78e62011 (diff) | |
| download | AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.tar.gz AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.zip | |
Merge testing into main for 44.x stable release44.20260913
Diffstat (limited to '.github/workflows/generate_release.yml')
| -rw-r--r-- | .github/workflows/generate_release.yml | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/.github/workflows/generate_release.yml b/.github/workflows/generate_release.yml index f741c83..bcdd948 100644 --- a/.github/workflows/generate_release.yml +++ b/.github/workflows/generate_release.yml @@ -26,12 +26,38 @@ 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: + RELEASE_TAG: ${{ inputs.release_tag }} + run: | + set -euo pipefail + + git tag --force "${RELEASE_TAG}" "${GITHUB_SHA}" + git push --force origin "refs/tags/${RELEASE_TAG}" + echo "Release tag ${RELEASE_TAG} now points to ${GITHUB_SHA}." - name: Determine release channel id: target @@ -40,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 + uses: softprops/action-gh-release@v3.0.3 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' }} |
