Skip to content

Fix publish-to-bcr config #18

Fix publish-to-bcr config

Fix publish-to-bcr config #18

name: Prepare release
on:
push:
tags:
- "v[0-9]*.[0-9]*"
jobs:
update-release-notes:
name: Update release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create archive
id: archive
run: |
TAG="${GITHUB_REF_NAME}"
REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
PREFIX="${REPOSITORY_NAME}-${TAG:1}"
ARCHIVE="${PREFIX}.tar.gz"
echo "tgz=${ARCHIVE}" >> $GITHUB_OUTPUT
git archive --format=tar.gz --prefix="${PREFIX}/" -o "$ARCHIVE" "${TAG}"
- name: Prepare bzlmod / WORKSPACE snippets
run: .github/workflows/prepare_snippets.sh ${{ steps.archive.outputs.tgz }} > release_notes.txt
- name: Generate changelog
run: |
printf '\n-----\n\n' >> release_notes.txt
awk -f .github/workflows/changelog.awk CHANGELOG.md >> release_notes.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: release_notes.txt
fail_on_unmatched_files: true
files: ${{ steps.archive.outputs.tgz }}