Skip to content

Commit ceec27c

Browse files
authored
Merge pull request #5 from yoannchaudet/main
Add support for `tar` on Windows
2 parents 9bd2be6 + 4143b6e commit ceec27c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
steps:
1515
- name: Archive artifact
1616
shell: bash
17+
if: runner.os != 'Windows'
1718
run: |
1819
tar \
1920
--dereference --hard-dereference \
@@ -22,6 +23,21 @@ runs:
2223
--exclude=.git \
2324
--exclude=.github \
2425
.
26+
27+
# Massage the paths for Windows only
28+
- name: Archive artifact
29+
shell: bash
30+
if: runner.os == 'Windows'
31+
run: |
32+
tar \
33+
--dereference --hard-dereference \
34+
--directory "${{ inputs.path }}" \
35+
-cvf "${{ runner.temp }}\artifact.tar" \
36+
--exclude=.git \
37+
--exclude=.github \
38+
--force-local \
39+
"."
40+
2541
- name: Upload artifact
2642
uses: actions/upload-artifact@main
2743
with:

0 commit comments

Comments
 (0)