forked from heroku/heroku-buildpack-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
27 lines (22 loc) · 937 Bytes
/
prepare-release.yml
File metadata and controls
27 lines (22 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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: |
set -euo pipefail
sed --in-place --regexp-extended \
--expression "s/v${EXISTING_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