From ab2c321b957dc6c2f39a9b1af10cf00e59485f17 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 7 Sep 2023 22:48:38 +0200 Subject: [PATCH] fix artifact renaming --- .github/workflows/create-release.yml | 32 ++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 9fb91f44..508ba626 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, macos-latest, windows-latest] - arch: [amd64] + arch: [amd64, arm64] include: - os: ubuntu-20.04 target: "./cmd/longtail/longtail" @@ -23,11 +23,15 @@ jobs: target: "./cmd/longtail/longtail" platform: macos tag: "${GITHUB_REF_NAME}" - arch: arm64 - os: windows-latest target: "./cmd/longtail/longtail.exe" platform: win32 tag: "${env:GITHUB_REF_NAME}" + exclude: + - os: ubuntu-20.04 + arch: arm64 + - os: windows-latest + arch: arm64 runs-on: ${{matrix.os}} @@ -98,16 +102,26 @@ jobs: - name: Rename artifacts run: | - cp dist-linux-amd64/longtail longtail-linux-x64 - cp dist-macos-amd64/longtail longtail-macos-x64 - cp dist-macos-arm64/longtail longtail-macos-arm64 - cp dist-win32-amd64/longtail.exe longtail-win32-x64.exe + mv dist-linux-amd64/longtail dist-linux-amd64/longtail-linux-x64 + mv dist-macos-amd64/longtail dist-macos-amd64/longtail-macos-x64 + mv dist-win32-amd64/longtail.exe dist-win32-amd64/longtail-win32-x64.exe + + mv dist-linux-amd64 dist-linux-x64 + mv dist-macos-amd64 dist-macos-x64 + mv dist-win32-amd64 dist-win32-x64 - name: Set execute permission run: | - chmod +x longtail-linux-x64 - chmod +x longtail-macos-x64 - chmod +x longtail-macos-arm64 + chmod +x dist-linux-x64/longtail-linux-x64 + chmod +x dist-macos-x64/longtail-macos-x64 + chmod +x dist-macos-amd64/longtail-macos-amd64 + + - name: Copy executables + run: | + cp dist-linux-x64/longtail longtail-linux-x64 + cp dist-macos-x64/longtail longtail-macos-x64 + cp dist-macos-arm64/longtail longtail-macos-arm64 + cp dist-win32-x64/longtail.exe longtail-win32-x64.exe - name: Zip Linux artifacts uses: montudor/action-zip@v0.1.0