diff --git a/action.yml b/action.yml index 0ef001d..0d354cb 100644 --- a/action.yml +++ b/action.yml @@ -14,7 +14,7 @@ runs: steps: - name: Archive artifact shell: bash - if: runner.os != 'Windows' + if: runner.os == 'Linux' run: | tar \ --dereference --hard-dereference \ @@ -24,6 +24,19 @@ runs: --exclude=.github \ . + # Switch to gtar (GNU tar instead of bsdtar which is the default in the MacOS runners so we can use --hard-dereference) + - name: Archive artifact + shell: bash + if: runner.os == 'macOS' + run: | + gtar \ + --dereference --hard-dereference \ + --directory ${{ inputs.path }} \ + -cvf ${{ runner.temp }}/artifact.tar \ + --exclude=.git \ + --exclude=.github \ + . + # Massage the paths for Windows only - name: Archive artifact shell: bash