From dec72736149fd6b414f0028647fe0526ac07b892 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Fri, 19 Jan 2024 13:13:38 +0100 Subject: [PATCH] try fix upload and change rel name --- .github/workflows/cd.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d1105b0..e25b6f3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -43,12 +43,18 @@ jobs: echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT fi - - uses: actions/upload-artifact@v3 + - name: Compress artifacts + shell: bash + run: | + tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz ${{github.workspace}}/build/bin/ + + - uses: actions/upload-artifact@v4 with: + # TODO: simpler name? name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64 # TODO: do propper packing path: | - ${{github.workspace}}/build/bin/ + ${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz windows: @@ -88,12 +94,18 @@ jobs: echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT fi - - uses: actions/upload-artifact@v3 + - name: Compress artifacts + shell: powershell + run: | + Compress-Archive -Path ${{github.workspace}}/build/bin/ -Destination ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-msvc-x86_64.zip + + - uses: actions/upload-artifact@v4 with: + # TODO: simpler name? name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-msvc-x86_64 # TODO: do propper packing path: | - ${{github.workspace}}/build/bin/ + ${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-msvc-x86_64.zip release: if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }} @@ -127,7 +139,9 @@ jobs: - name: Download artifacts id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: ./artifacts/ - name: Create release env: @@ -137,7 +151,7 @@ jobs: run: | gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ - --title="${GITHUB_REPOSITORY#*/} ${tag#v} nightly" \ + --title="nightly ${tag#v}" \ --generate-notes \ --prerelease @@ -147,5 +161,6 @@ jobs: tag: ${{ steps.tag.outputs.name }} shell: bash run: | - gh release upload "$tag" ./artifact \ + ls -la + gh release upload "$tag" ./artifacts/* \ --repo="$GITHUB_REPOSITORY"