Skip to content

Commit c0d190d

Browse files
vinzscammtlewis
andcommitted
use release version for yarn-plugin diffs
Co-Authored-by: MT Lewis <mtlewis@users.noreply.github.com> Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
1 parent d71bd99 commit c0d190d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/release.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
env:
1717
BACKSTAGE_APP_NAME: backstagediffapp
1818
VERSION: ${{ github.event.inputs.version }}
19+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
1920
steps:
2021
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
2122

@@ -61,24 +62,24 @@ jobs:
6162
- id: check_yarn_plugin_branch
6263
name: Check if yarn plugin branch already exists
6364
run: |
64-
SKIP_DIFF="true" && [[ -z "$(git ls-remote --heads origin release/yarn-plugin/${VERSION})" ]] && SKIP_DIFF="false"
65+
SKIP_DIFF="true" && [[ -z "$(git ls-remote --heads origin release/yarn-plugin/${RELEASE_VERSION})" ]] && SKIP_DIFF="false"
6566
echo "::set-output name=skip_create_diff::${SKIP_DIFF}"
6667
- name: Install yarn plugin
6768
run: |
6869
yarn plugin import https://versions.backstage.io/v1/tags/next/yarn-plugin
6970
- name: Run versions:bump to migrate to backstage:^ versions
7071
run: |
71-
npx @backstage/cli@latest versions:bump --release ${{ github.event.inputs.releaseVersion }}
72+
npx @backstage/cli@latest versions:bump --release $RELEASE_VERSION
7273
env:
7374
YARN_ENABLE_IMMUTABLE_INSTALLS: false
74-
- name: Create branch for release ${VERSION} with yarn plugin installed
75+
- name: Create branch for release ${RELEASE_VERSION} with yarn plugin installed
7576
if: steps.check_yarn_plugin_branch.outputs.skip_create_diff == 'false'
7677
run: |
77-
git checkout -b release/yarn-plugin/${VERSION}
78+
git checkout -b release/yarn-plugin/${RELEASE_VERSION}
7879
git add .
7980
git reset $BACKSTAGE_APP_NAME
80-
git commit -m "Release ${VERSION}"
81-
git push origin release/yarn-plugin/${VERSION}
81+
git commit -m "Release ${RELEASE_VERSION}"
82+
git push origin release/yarn-plugin/${RELEASE_VERSION}
8283
- run: echo "🍏 This job's status is ${{ job.status }}."
8384
diff:
8485
name: Create new diffs
@@ -110,9 +111,9 @@ jobs:
110111
mv _releases.json releases.json
111112
- name: Create new diffs for yarn plugin
112113
run: |
113-
for version in $(jq -r 'to_entries |.[] | .value.createApp // .key' < releases-yarn-plugin.json); do
114-
echo "Creating yarn-plugin diffs between version $version and $NEW_VERSION "
115-
git diff -U1 origin/release/yarn-plugin/$version..origin/release/yarn-plugin/$NEW_VERSION > diffs-yarn-plugin/$version..$NEW_VERSION.diff
114+
for version in $(jq -r 'to_entries |.[] | .key' < releases-yarn-plugin.json); do
115+
echo "Creating yarn-plugin diffs between version $version and $RELEASE_VERSION"
116+
git diff -U1 origin/release/yarn-plugin/$version..origin/release/yarn-plugin/$RELEASE_VERSION > diffs-yarn-plugin/$version..$RELEASE_VERSION.diff
116117
done
117118
- name: Add new version to releases-yarn-plugin.json
118119
run: |

0 commit comments

Comments
 (0)