From 5391d2affc11b5d2fec0572f68f7b06e55d08d17 Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Tue, 9 Jul 2024 21:12:36 +0800 Subject: [PATCH] ci: Update workflows for breaking changes See https://github.com/actions/download-artifact/blob/main/docs/MIGRATION.md for context. --- .github/workflows/release-dry-run.yml | 10 +++++++--- .github/workflows/release.yml | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml index 342e7086a..83cb5503f 100644 --- a/.github/workflows/release-dry-run.yml +++ b/.github/workflows/release-dry-run.yml @@ -81,7 +81,7 @@ jobs: - name: ${{ format('📦 Store binary ({0})', matrix.config) }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts + name: artifacts-binary-${{ matrix.platform }}-${{ matrix.config }} path: ${{ env.outBinaryPath }} retention-days: 2 - name: ${{ format('💎 Build Gem(s) ({0})', matrix.config) }} @@ -89,7 +89,7 @@ jobs: - name: ${{ format('📦 Store Gem(s) to GitHub ({0})', matrix.config) }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts + name: artifacts-gem-${{ matrix.platform }}-${{ matrix.config }} path: bazel-bin/gems/scip-ruby/*.gem retention-days: 2 @@ -110,5 +110,9 @@ jobs: echo "Create release: tag=$TAG, title=$TITLE" - name: '📥 Download all artifacts' uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: release-artifacts + merge-multiple: true - name: '📤 List artifacts for release' - run: ls ./*-release-artifacts/** + run: ls ./release-artifacts/** diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb2971821..a0fb932e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,14 +75,14 @@ jobs: - name: ${{ format('📦 Store binary ({0})', matrix.config) }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts + name: artifacts-binary-${{ matrix.platform }}-${{ matrix.config }} path: ${{ env.outBinaryPath }} - name: ${{ format('💎 Build Gem(s) ({0})', matrix.config) }} run: ./bazel build //gems/scip-ruby --config="${{ env.config }}" - name: ${{ format('📦 Store Gem(s) to GitHub ({0})', matrix.config) }} uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }}-${{ matrix.config }}-release-artifacts + name: artifacts-gem-${{ matrix.platform }}-${{ matrix.config }} path: bazel-bin/gems/scip-ruby/*.gem create-release: @@ -104,13 +104,17 @@ jobs: # platforms here. - name: '📥 Download all artifacts' uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: release-artifacts + merge-multiple: true - name: '📤 Upload artifacts for release' - run: gh release upload "${GITHUB_REF/refs\/tags\//}" ./*-release-artifacts/* + run: gh release upload "${GITHUB_REF/refs\/tags\//}" ./release-artifacts/* env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # There is also publish-manual.yml in case that is needed for some reason. - name: 'Publish gems' run: | - for g in ./*-release-artifacts/**.gem; do + for g in ./release-artifacts/**.gem; do GEM_HOST_API_KEY=${{ secrets.RUBYGEMS_API_KEY }} gem push "$g" done