From 6204086053d0f0f8d73bdd97c22f8537f23d9a5a Mon Sep 17 00:00:00 2001 From: skwasjer <11424653+skwasjer@users.noreply.github.com> Date: Sat, 3 Feb 2024 02:45:53 +0100 Subject: [PATCH] ci: v4 upload/download improvements don't require custom tar logic anymore --- .github/actions/download-artifact/action.yml | 32 ------------- .github/actions/upload-artifact/action.yml | 47 -------------------- .github/workflows/main.yml | 6 +-- 3 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 .github/actions/download-artifact/action.yml delete mode 100644 .github/actions/upload-artifact/action.yml diff --git a/.github/actions/download-artifact/action.yml b/.github/actions/download-artifact/action.yml deleted file mode 100644 index f9d3ba4d..00000000 --- a/.github/actions/download-artifact/action.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Download artifact -description: Wrapper around GitHub's official action, with additional extraction before download - -# https://github.com/actions/download-artifact/blob/main/action.yml -# https://github.com/actions/upload-artifact/issues/199 -inputs: - name: - description: Artifact name - required: true - path: - description: Destination path - required: false - default: . - -runs: - using: composite - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ${{ inputs.name }} - path: ${{ inputs.path }} - - - name: Extract artifacts - run: tar -xvf ${{ inputs.name }}.tar - shell: bash - working-directory: ${{ inputs.path }} - - - name: Remove archive - run: rm -f ${{ inputs.name }}.tar - shell: bash - working-directory: ${{ inputs.path }} diff --git a/.github/actions/upload-artifact/action.yml b/.github/actions/upload-artifact/action.yml deleted file mode 100644 index 0a6bc695..00000000 --- a/.github/actions/upload-artifact/action.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Upload artifact -description: Wrapper around GitHub's official action, with additional archiving before upload - -# https://github.com/actions/upload-artifact/blob/main/action.yml -# https://github.com/actions/upload-artifact/issues/199 -inputs: - name: - description: Artifact name - required: true - path: - description: One or more files, directories or wildcard pattern that describes what to upload - required: true - if-no-files-found: - description: > - The desired behavior if no files are found using the provided path. - Available Options: - warn: Output a warning but do not fail the action - error: Fail the action with an error message - ignore: Do not output any warnings or errors, the action does not fail - required: false - default: warn - retention-days: - description: > - Duration after which artifact will expire in days. 0 means using default retention. - Minimum 1 day. - Maximum 90 days unless changed from the repository settings page. - required: false - default: '0' - -runs: - using: composite - steps: - - name: Archive artifacts - run: tar -cv -I 'xz -0 -T0' -f ${{ inputs.name }}.tar $(echo "${{ inputs.path }}" | tr '\n' ' ') - shell: bash - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - if-no-files-found: ${{ inputs.if-no-files-found }} - name: ${{ inputs.name }} - path: ${{ inputs.name }}.tar - retention-days: ${{ inputs.retention-days }} - - - name: Remove archive - run: rm -f ${{ inputs.name }}.tar - shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2df5152b..df735b7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,7 +88,7 @@ jobs: # Build - run: dotnet build --no-restore -c Release ${{ env.msbuild-version-args }} - name: Upload build artifacts - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: build path: | @@ -120,7 +120,7 @@ jobs: # Restore build artifacts - name: Download build artifacts - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: build @@ -155,7 +155,7 @@ jobs: # Restore build artifacts - name: Download build artifacts - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: build