From 513175ae970a34a29b900d4660a2ff45ebc9bedb Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Sun, 14 Apr 2024 21:31:38 +0100 Subject: [PATCH] sync_release-manifest: remove top-level backstage directory The top-level backstage/ directory included in this repo means we can't use the yarn-install backstage action (or we'd have to add a `path` input option to it). Looking at this workflow, I can't actually spot why the top-level `backstage` dir is needed - nothing is ever written outside it as far as I can spot. With that in mind, proposing we remove it to simplify the workflow and enable the use of the `yarn-install` action without needing to extend it. Signed-off-by: MT Lewis --- .github/workflows/sync_release-manifest.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sync_release-manifest.yml b/.github/workflows/sync_release-manifest.yml index e7c06747f7..6d02309f8a 100644 --- a/.github/workflows/sync_release-manifest.yml +++ b/.github/workflows/sync_release-manifest.yml @@ -15,7 +15,6 @@ jobs: - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: - path: backstage # 'v' prefix is added here for the tag, we keep it out of the manifest logic ref: v${{ github.event.client_payload.version }} @@ -28,11 +27,10 @@ jobs: - name: yarn install uses: backstage/actions/yarn-install@a674369920067381b450d398b27df7039b7ef635 # v0.6.5 with: - path: backstage cache-prefix: ${{ runner.os }}-v18.x - name: Build yarn plugin - working-directory: backstage/packages/yarn-plugin + working-directory: packages/yarn-plugin run: yarn build # Checkout backstage/versions into /backstage/versions, which is where store the output @@ -40,7 +38,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: backstage/versions - path: backstage/versions + path: versions token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} - name: Configure Git @@ -51,7 +49,6 @@ jobs: - name: Create release # This grabs the scripts from master in order to support backfills run: | - cd backstage 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 }} @@ -60,16 +57,15 @@ jobs: # 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 + working-directory: 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 + working-directory: versions run: | - cd versions git add . git commit -am "${{ github.event.client_payload.version }}" git push @@ -87,7 +83,7 @@ jobs: workflow_id: 'release.yml', ref: 'master', inputs: { - version: require('./backstage/packages/create-app/package.json').version, - releaseVersion: require('./backstage/package.json').version + version: require('./packages/create-app/package.json').version, + releaseVersion: require('./package.json').version }, });