From 483d674da1ad99b501496c3e0d34ea334b7e835e Mon Sep 17 00:00:00 2001 From: Koen Vlaswinkel Date: Tue, 7 Feb 2023 11:06:03 +0000 Subject: [PATCH] Upload sourcemaps as release asset This will upload the sourcemaps produced as part of the release as a release asset. This allows the sourcemaps to be downloaded and used for decoding stack traces beyond the 90 day artifact limit of GitHub Actions. --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05ef308d68f..bff69e9da38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,6 +94,23 @@ jobs: asset_name: ${{ format('vscode-codeql-{0}.vsix', steps.prepare-artifacts.outputs.ref_name) }} asset_content_type: application/zip + - name: Create sourcemap ZIP file + run: | + cd dist/vscode-codeql/out + zip -r ../../vscode-codeql-sourcemaps.zip *.map + + - name: Upload sourcemap ZIP file + uses: actions/upload-release-asset@v1.0.1 + if: success() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Get the `upload_url` from the `create-release` step above. + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: dist/vscode-codeql-sourcemaps.zip + asset_name: ${{ format('vscode-codeql-sourcemaps-{0}.zip', steps.prepare-artifacts.outputs.ref_name) }} + asset_content_type: application/zip + ### # Do Post release work: version bump and changelog PR # Only do this if we are running from a PR (ie- this is part of the release process)