Skip to content

Commit

Permalink
build: Fix incorrect zip file names for release binaries
Browse files Browse the repository at this point in the history
Fixes #461
  • Loading branch information
Göran Sander committed Apr 22, 2024
1 parent dc0640b commit 86ba819
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
release_tag_name: ${{ steps.release.outputs['tag_name'] }}
release_version: ${{ steps.release.outputs['version'] }}
release_upload_url: ${{ steps.release.outputs['upload_url'] }}
env:
GITHUB_REF: ${{ github.ref }}
Expand Down Expand Up @@ -83,6 +84,7 @@ jobs:
- name: Release tag and upload url from previous job
run: |
echo "tag_name : ${{ needs.release-please.outputs.release_tag_name }}"
echo "version : ${{ needs.release-please.outputs.release_version }}"
echo "upload_url : ${{ needs.release-please.outputs.release_upload_url }}"
- name: Checkout repository
Expand Down Expand Up @@ -137,14 +139,14 @@ jobs:
# Notarize release binary
echo "Creating temp notarization archive for release binary"
# ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}.zip"
ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip"
ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-macos.zip"
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
# you're curious
echo "Notarize release app"
xcrun notarytool submit "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip" --keychain-profile "notarytool-profile" --wait
xcrun notarytool submit "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-macos.zip" --keychain-profile "notarytool-profile" --wait
# Delete build keychain
security delete-keychain build.keychain
Expand All @@ -159,7 +161,7 @@ jobs:
# artifactContentType: application/zip
draft: true
tag: ${{ needs.release-please.outputs.release_tag_name }}
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_tag_name }}-macos.zip
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_version }}-macos.zip
token: ${{ github.token }}

- name: Tidy up before existing
Expand All @@ -168,7 +170,7 @@ jobs:
ls -la
rm build.cjs
rm "./${DIST_FILE_NAME}"
rm "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip"
rm "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-macos.zip"
#####################
release-win64:
Expand All @@ -192,6 +194,7 @@ jobs:
- name: Release tag and upload url from previous job
run: |
Write-Output 'tag_name : ${{ needs.release-please.outputs.release_tag_name }}'
Write-Output 'version : ${{ needs.release-please.outputs.release_version }}'
Write-Output 'upload_url : ${{ needs.release-please.outputs.release_upload_url }}'
- name: Checkout repository
Expand Down Expand Up @@ -241,7 +244,7 @@ jobs:
$compress = @{
Path = "./${env:DIST_FILE_NAME}.exe"
CompressionLevel = "Fastest"
DestinationPath = "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
DestinationPath = "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-win.zip"
}
Compress-Archive @compress
Expand All @@ -255,15 +258,15 @@ jobs:
# artifactContentType: application/zip
draft: true
tag: ${{ needs.release-please.outputs.release_tag_name }}
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_tag_name }}-win.zip
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_version }}-win.zip
token: ${{ github.token }}

- name: Tidy up before existing
run: |
dir
del build.cjs
del "./${env:DIST_FILE_NAME}.exe"
del "./${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
del "./${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-win.zip"
#####################
release-linux:
Expand All @@ -279,6 +282,7 @@ jobs:
- name: Release tag and upload url from previous job
run: |
echo "tag_name : ${{ needs.release-please.outputs.release_tag_name }}"
echo "version : ${{ needs.release-please.outputs.release_version }}"
echo "upload_url : ${{ needs.release-please.outputs.release_upload_url }}"
- name: Checkout repository
Expand Down Expand Up @@ -312,7 +316,7 @@ jobs:
- name: Compress release binary
run: |
ls -la
zip -9 -r ./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip ${DIST_FILE_NAME}
zip -9 -r ./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-linux.zip ${DIST_FILE_NAME}
- name: Debug
run: |
Expand All @@ -328,7 +332,7 @@ jobs:
# artifactContentType: application/zip
draft: true
tag: ${{ needs.release-please.outputs.release_tag_name }}
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_tag_name }}-linux.zip
artifacts: ./ctrl-q-${{ needs.release-please.outputs.release_version }}-linux.zip
token: ${{ github.token }}

- name: Tidy up before existing
Expand All @@ -337,4 +341,4 @@ jobs:
ls -la
rm build.cjs
rm "./${DIST_FILE_NAME}"
rm "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip"
rm "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_version }}-linux.zip"

0 comments on commit 86ba819

Please sign in to comment.