From 4143b6e8b820ab42ba9ea848a616c800a5473f89 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Mon, 1 Aug 2022 06:46:01 -0700 Subject: [PATCH] Add support for `tar` on Windows --- action.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/action.yml b/action.yml index 39b29b1..b318be9 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,7 @@ runs: steps: - name: Archive artifact shell: bash + if: runner.os != 'Windows' run: | tar \ --dereference --hard-dereference \ @@ -22,6 +23,21 @@ runs: --exclude=.git \ --exclude=.github \ . + + # Massage the paths for Windows only + - name: Archive artifact + shell: bash + if: runner.os == 'Windows' + run: | + tar \ + --dereference --hard-dereference \ + --directory "${{ inputs.path }}" \ + -cvf "${{ runner.temp }}\artifact.tar" \ + --exclude=.git \ + --exclude=.github \ + --force-local \ + "." + - name: Upload artifact uses: actions/upload-artifact@main with: