GitHubアクションでアーティファクトをアップロードする
Sep 23 2020
アーティファクトに「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 }}
回答
ItayBrenner Sep 23 2020 at 23:00
あなたはこれを使うことができます:
- 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 }}
アーティファクトと目的のファイルの間にフォルダを作成するだけです