From a1e5d2e2307fb20ad47fd6b07d9a0cfd6eea2242 Mon Sep 17 00:00:00 2001 From: Mehrad Mahmoudian Date: Mon, 3 Feb 2025 15:11:55 +0200 Subject: [PATCH] CI: migrate all upload-artifact actions from v3 to v4 (#3830) * migrate all upload-artifact actions from v3 to v4 * fix the artifact overwrite in @v4 --- .github/workflows/Linux-pack.yml | 19 +++++++++++++------ .github/workflows/MacOS-pack.yml | 3 ++- .github/workflows/Windows-pack.yml | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 4f2b0e0f..b02809b2 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -232,12 +232,13 @@ jobs: echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb) echo "======no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum + overwrite: true rpm-pack: name: Build rpm on ${{ matrix.dist.name }} ${{ matrix.dist.arch }} @@ -339,20 +340,23 @@ jobs: echo "======no operation for you can see link in the log console=====" - name: Artifact Upload if: matrix.dist.os == 'fedora' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/build/ + overwrite: true - name: Artifact Upload if: matrix.dist.os == 'opensuse-leap' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum + overwrite: true + appimage-pack: name: Build appimage on ${{ matrix.config.name }} runs-on: ubuntu-22.04 @@ -481,12 +485,13 @@ jobs: echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.x86_64.AppImage) echo "======no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/Flameshot-*.x86_64.AppImage ${{ github.workspace }}/Flameshot-*.x86_64.AppImage.sha256sum + overwrite: true flatpak-pack: name: Build flatpak on ubuntu-20.04 @@ -547,12 +552,13 @@ jobs: echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.x86_64.flatpak) echo "======no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak ${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak.sha256sum + overwrite: true snap-pack: name: Build snap on ubuntu-20.04 @@ -604,9 +610,10 @@ jobs: echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap) echo "======no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Linux-distribution-artifact path: | ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap.sha256sum + overwrite: true diff --git a/.github/workflows/MacOS-pack.yml b/.github/workflows/MacOS-pack.yml index c7e4dcdd..325302f1 100644 --- a/.github/workflows/MacOS-pack.yml +++ b/.github/workflows/MacOS-pack.yml @@ -80,10 +80,11 @@ jobs: echo "=====no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: MacOS-artifact path: ${{ github.workspace }}/build/src/flameshot.dmg + overwrite: true - name: Notarization status shell: bash diff --git a/.github/workflows/Windows-pack.yml b/.github/workflows/Windows-pack.yml index a85a5af6..3bbbc940 100644 --- a/.github/workflows/Windows-pack.yml +++ b/.github/workflows/Windows-pack.yml @@ -207,3 +207,4 @@ jobs: with: name: Windows-${{ matrix.config.arch }}-${{ matrix.type }}-artifact path: ${{ github.workspace }}/build/Package/* + overwrite: true