Skip to content

Commit f4e6901

Browse files
authored
Merge pull request #10 from Robert-96/main
Add support for macOS-based workflows
2 parents 780ca3f + e361946 commit f4e6901

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

action.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
steps:
1515
- name: Archive artifact
1616
shell: bash
17-
if: runner.os != 'Windows'
17+
if: runner.os == 'Linux'
1818
run: |
1919
tar \
2020
--dereference --hard-dereference \
@@ -24,6 +24,19 @@ runs:
2424
--exclude=.github \
2525
.
2626
27+
# Switch to gtar (GNU tar instead of bsdtar which is the default in the MacOS runners so we can use --hard-dereference)
28+
- name: Archive artifact
29+
shell: bash
30+
if: runner.os == 'macOS'
31+
run: |
32+
gtar \
33+
--dereference --hard-dereference \
34+
--directory ${{ inputs.path }} \
35+
-cvf ${{ runner.temp }}/artifact.tar \
36+
--exclude=.git \
37+
--exclude=.github \
38+
.
39+
2740
# Massage the paths for Windows only
2841
- name: Archive artifact
2942
shell: bash

0 commit comments

Comments
 (0)