Skip to content

Prepare Release

Prepare Release #1

name: Prepare Release
on:
workflow_dispatch:
# Disable all GITHUB_TOKEN permissions, since the GitHub App token is used instead.
permissions: {}
jobs:
prepare-release:
uses: heroku/languages-github-actions/.github/workflows/_classic-buildpack-prepare-release.yml@latest
secrets: inherit
with:
custom_update_command: |
sed --in-place --regexp-extended \
--expression "s/v${OLD_VERSION}/v${NEW_VERSION}/" \
lib/language_pack/version.rb
if compgen -G 'changelogs/unreleased/*.md' > /dev/null; then
# The unreleased changelogs directory contains a `.gitkeep` file, so we have to
# copy the markdown files individually instead of renaming the directory.
NEW_CHANGELOG_DIR="changelogs/v${NEW_VERSION}/"
mkdir -p "${NEW_CHANGELOG_DIR}"
mv changelogs/unreleased/*.md "${NEW_CHANGELOG_DIR}"
fi