[英]upload artifact in GitHub Action
How do I update the following code so that artifact contains a folder named 'Scripts' and all the files are copied to 'Scripts' folder?如何更新以下代码,以便工件包含名为“Scripts”的文件夹并将所有文件复制到“Scripts”文件夹?
- 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 }}
You can use this:你可以使用这个:
- 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 }}
Just create a folder between your artifact and your desired files只需在您的工件和所需文件之间创建一个文件夹
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.