- If your job produces a build artifact that users need to view, or need to be passed to another build machine, the Github Actions upload and download can help with this process.
-
Add the following code to your build pipeline, and it will then start publishing the artifact once the step has completed.
-
Create a new branch called
Artifacts
-
Copy and paste the following code snippet into one of your working workflow files:
# Upload an artifact to GitHub
- name: Upload Artifact to Github Build Job
uses: actions/upload-artifact@v2
with:
name: my-artifact
path: path/to/artifact/world.txt
# Download an artifact from GitHub
- name: Download Artifact from Github Build Job
uses: actions/download-artifact@v2
with:
name: my-artifact
Note: Please update the path to an artifact that was created in the build process.