sync_release-manifest: add yarn-plugin to release directory
Since yarn plugins aren't installable via npm, we need a place to make the version available for each release. Since versions.backstage.io already provides an API backed by a git repo organized by release (and even includes release line links), it seems like the perfect spot. This commit adds the yarn plugin to the appropriate directory when the sync_release-management workflow runs, reorganizing the existing functionality for pushing the changes to the versions repo with a little bit of refactoring. Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -31,6 +31,10 @@ jobs:
|
||||
path: backstage
|
||||
cache-prefix: ${{ runner.os }}-v18.x
|
||||
|
||||
- name: Build yarn plugin
|
||||
working-directory: backstage/packages/yarn-plugin
|
||||
run: yarn build
|
||||
|
||||
# Checkout backstage/versions into /backstage/versions, which is where store the output
|
||||
- name: Checkout versions
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
@@ -51,6 +55,20 @@ jobs:
|
||||
mkdir -p scripts
|
||||
wget -O scripts/assemble-manifest.js https://raw.githubusercontent.com/backstage/backstage/master/scripts/assemble-manifest.js
|
||||
node scripts/assemble-manifest.js ${{ github.event.client_payload.version }}
|
||||
|
||||
# Copies the build output of the yarn-plugin package to the appropriate
|
||||
# directory, allowing the plugin to be installed with a command like
|
||||
# `yarn plugin import https://versions.backstage.io/v1/tags/main/yarn-plugin`
|
||||
- name: Add yarn plugin to release
|
||||
working-directory: backstage/packages/yarn-plugin
|
||||
run: >-
|
||||
cp
|
||||
bundles/@yarnpkg/plugin-backstage.js
|
||||
../../versions/v1/releases/${{ github.event.client_payload.version }}/yarn-plugin
|
||||
|
||||
- name: Commit to versions repo
|
||||
working-directory: backstage/versions
|
||||
run: |
|
||||
cd versions
|
||||
git add .
|
||||
git commit -am "${{ github.event.client_payload.version }}"
|
||||
|
||||
Reference in New Issue
Block a user