如何更新以下代码,以使工件包含名为“脚本”的文件夹,并将所有文件复制到“脚本”文件夹?
- name: copy scripts
run: Copy 'Scripts/' '${{ github.workspace }}/Scripts'
shell: powershell
- name: publish artifact
uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/Scripts
name: ${{ github.run_number }}
答案 0 :(得分:0)
您可以使用此:
- name: Create Artifact Folder
run: New-Item -Path '${{ github.workspace }}' -Name "Artifacts" -ItemType "directory"
shell: powershell
- name: Copy Scripts
run: Copy 'Scripts/' '${{ github.workspace }}/Artifacts/Scripts'
shell: powershell
- name: Publish Artifact
uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/Artifacts
name: ${{ github.run_number }}
只需在您的工件和所需文件之间创建一个文件夹