-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set publish metadata * Calculate CLI Binary base64 file handle * Calculate Electron Binary base64 file handle * Create Tag and Release * Upload artifacts to release
- Loading branch information
Showing
1 changed file
with
51 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,60 +70,59 @@ jobs: | |
token: ${{ secrets.EE_DOWNLOAD_TOKEN }} | ||
out-file-path: ${{ env.ARTIFACTS_DOWNLOAD_PATH }} | ||
|
||
- name: Debug downloaded artifacts | ||
run: ls -lah ${{ env.ARTIFACTS_DOWNLOAD_PATH }} | ||
|
||
|
||
# - name: Set publish metadata # Checksum for provenance must be calculated before moving artifacts temporarily | ||
# id: metadata | ||
# run: | | ||
# INSO_VERSION=$(jq .version packages/insomnia-inso/package.json -rj) | ||
# echo "INSO_VERSION=${INSO_VERSION}" >> $GITHUB_ENV | ||
# echo "CLI_ARTIFACT_BASE64_FILE=${{env.CLI_ARTIFACT_BASE64_FILE}}" >> $GITHUB_ENV | ||
# echo "ELECTRON_ARTIFACT_BASE64_FILE=${{env.ELECTRON_ARTIFACT_BASE64_FILE}}" >> $GITHUB_ENV | ||
# ./.github/scripts/generate-binary-digest.sh | ||
# env: | ||
# ARTIFACT_PATH: "${{ env.ARTIFACTS_DOWNLOAD_PATH }}" | ||
# CLI_ARTIFACT_SHAFILE: ${{runner.temp}}/cli.sha256 | ||
# ELECTRON_ARTIFACT_SHAFILE: ${{runner.temp}}/electron.sha256 | ||
# CLI_ARTIFACT_BASE64_FILE: ${{runner.temp}}/cli_digests_file.text | ||
# ELECTRON_ARTIFACT_BASE64_FILE: ${{runner.temp}}/electron_digests_file.text | ||
|
||
# - name: Calculate CLI Binary base64 file handle | ||
# uses: slsa-framework/slsa-github-generator/actions/generator/generic/[email protected] | ||
# id: cli_binary_hashes | ||
# with: | ||
# path: ${{ env.CLI_ARTIFACT_BASE64_FILE }} | ||
|
||
# - name: Calculate Electron Binary base64 file handle | ||
# uses: slsa-framework/slsa-github-generator/actions/generator/generic/[email protected] | ||
# id: electron_binary_hashes | ||
# with: | ||
# path: ${{ env.ELECTRON_ARTIFACT_BASE64_FILE }} | ||
# - name: Debug downloaded artifacts | ||
# run: ls -lah ${{ env.ARTIFACTS_DOWNLOAD_PATH }} | ||
|
||
- name: Set publish metadata # Checksum for provenance must be calculated before moving artifacts temporarily | ||
id: metadata | ||
run: | | ||
INSO_VERSION=$(jq .version packages/insomnia-inso/package.json -rj) | ||
echo "INSO_VERSION=${INSO_VERSION}" >> $GITHUB_ENV | ||
echo "CLI_ARTIFACT_BASE64_FILE=${{env.CLI_ARTIFACT_BASE64_FILE}}" >> $GITHUB_ENV | ||
echo "ELECTRON_ARTIFACT_BASE64_FILE=${{env.ELECTRON_ARTIFACT_BASE64_FILE}}" >> $GITHUB_ENV | ||
./.github/scripts/generate-binary-digest.sh | ||
env: | ||
ARTIFACT_PATH: "${{ env.ARTIFACTS_DOWNLOAD_PATH }}" | ||
CLI_ARTIFACT_SHAFILE: ${{runner.temp}}/cli.sha256 | ||
ELECTRON_ARTIFACT_SHAFILE: ${{runner.temp}}/electron.sha256 | ||
CLI_ARTIFACT_BASE64_FILE: ${{runner.temp}}/cli_digests_file.text | ||
ELECTRON_ARTIFACT_BASE64_FILE: ${{runner.temp}}/electron_digests_file.text | ||
|
||
- name: Calculate CLI Binary base64 file handle | ||
uses: slsa-framework/slsa-github-generator/actions/generator/generic/[email protected] | ||
id: cli_binary_hashes | ||
with: | ||
path: ${{ env.CLI_ARTIFACT_BASE64_FILE }} | ||
|
||
# - name: Create Tag and Release | ||
# uses: ncipollo/release-action@v1 | ||
# id: core_tag_and_release | ||
# with: | ||
# tag: ${{ env.RELEASE_CORE_TAG }} | ||
# name: "${{ env.RELEASE_VERSION }} 📦" | ||
# generateReleaseNotes: true | ||
# commit: ${{ env.RELEASE_BRANCH }} | ||
# prerelease: ${{ env.IS_PRERELEASE }} | ||
# draft: false | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Calculate Electron Binary base64 file handle | ||
uses: slsa-framework/slsa-github-generator/actions/generator/generic/[email protected] | ||
id: electron_binary_hashes | ||
with: | ||
path: ${{ env.ELECTRON_ARTIFACT_BASE64_FILE }} | ||
|
||
# - name: Upload artifacts to release | ||
# uses: xresloader/upload-to-github-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# release_id: ${{ steps.core_tag_and_release.outputs.id }} | ||
# tag_name: ${{ env.RELEASE_CORE_TAG }} | ||
# file: "./artifacts/*-artifacts/insomnia/dist/Insomnia.*;./artifacts/*-artifacts/insomnia/dist/squirrel-windows/*;./artifacts/*-artifacts/insomnia-inso/artifacts/inso-*;./artifacts/**/*sbom.{spdx,cyclonedx}.json" | ||
# prerelease: ${{ env.IS_PRERELEASE }} | ||
# draft: false | ||
- name: Create Tag and Release | ||
uses: ncipollo/release-action@v1 | ||
id: core_tag_and_release | ||
with: | ||
tag: ${{ env.RELEASE_CORE_TAG }} | ||
name: "${{ env.RELEASE_VERSION }} 📦" | ||
generateReleaseNotes: true | ||
commit: ${{ env.RELEASE_BRANCH }} | ||
prerelease: ${{ env.IS_PRERELEASE }} | ||
draft: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload artifacts to release | ||
uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ steps.core_tag_and_release.outputs.id }} | ||
tag_name: ${{ env.RELEASE_CORE_TAG }} | ||
file: "./artifacts/*-artifacts/insomnia/dist/Insomnia.*;./artifacts/*-artifacts/insomnia/dist/squirrel-windows/*;./artifacts/*-artifacts/insomnia-inso/artifacts/inso-*;./artifacts/**/*sbom.{spdx,cyclonedx}.json" | ||
prerelease: ${{ env.IS_PRERELEASE }} | ||
draft: false | ||
|
||
# - name: Publish beta/stable of Insomnia to Insomnia API | ||
# if: ${{ !contains(github.event.inputs.version, 'alpha') }} | ||
|