how to publish artifact in github actions

In GitHub Actions, artifacts enable sharing data among workflow jobs. Using the upload-artifact action, users can publish a single artifact with name and path parameters, while for multiple artifacts, they can utilize the upload-artifacts action spec

how to publish artifact in github actions

How to publish artifact in github actions?

Yes, you can publish artifacts in GitHub Actions. To publish an artifact, you can use the upload-artifact action. The syntax for the upload-artifact action is as follows:

<code class="yaml">- uses: actions/upload-artifact@v2
with:
name: artifact-name
path: path-to-artifact</code>

For example, the following code publishes an artifact named my-artifact with the contents of the dist directory:

<code class="yaml">- uses: actions/upload-artifact@v2
with:
name: my-artifact
path: dist</code>

How to publish multiple artifacts in github actions?

To publish multiple artifacts in GitHub Actions, you can use the upload-artifacts action. The syntax for the upload-artifacts action is as follows:

<code class="yaml">- uses: actions/upload-artifacts@v2
with:
artifacts: artifact-paths</code>

For example, the following code publishes two artifacts, my-artifact1 and my-artifact2:

<code class="yaml">- uses: actions/upload-artifacts@v2
with:
artifacts: dist/my-artifact1.zip,dist/my-artifact2.zip</code>

Can you publish artifacts in github actions?

Yes, you can publish artifacts in GitHub Actions. To publish an artifact, you can use the upload-artifact action or the upload-artifacts action.

The above is the detailed content of how to publish artifact in github actions. For more information, please follow other related articles on the PHP Chinese website!

原文来自:www.php.cn
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容