How do I update the following code so that artifact contains a folder named 'Scripts' and all the files are copied to 'Scripts' folder?
- 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With