mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2025-12-08 16:16:18 +00:00
Merge pull request #5 from yoannchaudet/main
Add support for `tar` on Windows
This commit is contained in:
16
action.yml
16
action.yml
@@ -14,6 +14,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Archive artifact
|
- name: Archive artifact
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
tar \
|
tar \
|
||||||
--dereference --hard-dereference \
|
--dereference --hard-dereference \
|
||||||
@@ -22,6 +23,21 @@ runs:
|
|||||||
--exclude=.git \
|
--exclude=.git \
|
||||||
--exclude=.github \
|
--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
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user