From 0d1e3e459f717c1ac7edf6acf778b9c05f2e2c99 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Tue, 19 Nov 2024 16:16:03 -0500 Subject: [PATCH] add release-binary reusable flow part 4 --- .github/workflows/dev-release.yml | 14 +++++++------- .github/workflows/release-binary.yml | 8 +++++--- .github/workflows/sign-binary.yml | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 6ce29ee52..d4c7d8d31 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -45,15 +45,15 @@ jobs: # - lando-linux-x64-${{ github.sha }} # - lando-macos-x64-${{ github.sha }} - # - lando-win-x64-${{ github.sha }}.exe + # - lando-win-x64-${{ github.sha }} # - lando-linux-arm64-${{ github.sha }}-slim # - lando-macos-arm64-${{ github.sha }}-slim - # - lando-win-arm64-${{ github.sha }}-slim.exe + # - lando-win-arm64-${{ github.sha }}-slim - lando-linux-x64-${{ github.sha }}-slim - lando-macos-x64-${{ github.sha }}-slim - - lando-win-x64-${{ github.sha }}-slim.exe + - lando-win-x64-${{ github.sha }}-slim with: download-pattern: packaged-lando-* @@ -88,9 +88,9 @@ jobs: - dev - latest with: - destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.alias }}${{ matrix.type }}.exe + destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.alias }}${{ matrix.type }}${{ matrix.os == 'win' && '.exe' || '' }} download-pattern: signed-lando-* - source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}${{ matrix.type }}.exe + source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}${{ matrix.type }}${{ matrix.os == 'win' && '.exe' || '' }} release-binary-branch: uses: ./.github/workflows/release-binary.yml @@ -110,9 +110,9 @@ jobs: - -slim - with: - destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.type }}.exe + destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.type }} download-pattern: signed-lando-* - source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}${{ matrix.type }}.exe + source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}${{ matrix.type }} # - name: Configure S3 Credentials diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index b87fbdbda..af06dc52e 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -43,14 +43,16 @@ jobs: - name: Mod as needed run: | mkdir -p /tmp/release-binary - cp -rf "/tmp/${{ github.sha }}/${{ inputs.source }}" "/tmp/release-binary/${{ inputs.destination }}" + cp -rf \ + "/tmp/${{ github.sha }}/${{ inputs.source }}${{ runner.os == 'Windows' && !endsWith(inputs.source, '.exe') && '.exe' || '' }}" \ + "/tmp/release-binary/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}" chmod +x /tmp/release-binary/* ls -lsa /tmp/release-binary - name: Upload signed binaries uses: actions/upload-artifact@v4 with: - name: release-binary-${{ inputs.destination }} + name: release-binary-${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}" overwrite: true - path: /tmp/release-binary/${{ inputs.destination }} + path: /tmp/release-binary/${{ inputs.destination }}${{ runner.os == 'Windows' && !endsWith(inputs.destination, '.exe') && '.exe' || '' }}" if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/sign-binary.yml b/.github/workflows/sign-binary.yml index a59cc021c..275b116a7 100644 --- a/.github/workflows/sign-binary.yml +++ b/.github/workflows/sign-binary.yml @@ -80,7 +80,7 @@ jobs: certificate-data: ${{ secrets.certificate-data }} certificate-id: FY8GAUX282 certificate-password: ${{ secrets.certificate-password }} - file: ${{ steps.download-artifacts.outputs.download-path }}/${{ inputs.file }} + file: ${{ steps.download-artifacts.outputs.download-path }}/${{ inputs.file }}${{ runner.os == 'Windows' && !endsWith(inputs.file, '.exe') && '.exe' || '' }} keylocker-api-key: ${{ secrets.keylocker-api-key }} keylocker-cert-sha1-hash: ${{ secrets.keylocker-cert-sha1-hash }} keylocker-host: https://clientauth.one.digicert.com