-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement: option to upload artifact on ci workflow #342
Comments
Since this is probablyyy a niche feature, i think i'd prefer if the action would output the paths of the generated bundles instead. This would be way more flexible and could cover more use cases. any thoughts about that? |
it's an alternative solution, why not |
I reopen, because after some thoughts, I would like to add short commit into assets name, to avoid confusion with release assets |
This is slightly related, but seems like a good place to ask this: Do the artifacts stick around after the action ends? I ask this because we are having trouble sending them to an S3 bucket, with the error output stating that the path does not exist. |
Yes they do, but only for the following steps of the current jobs, other jobs won't have access to it. |
I would like to second the ability to upload artifacts without having to rely on releases. I very frequently build all binaries as part of a PR, and it is really nice to be able to go to a run artifacts section and download binaries from there (for testers, etc). Example: https://github.com/martpie/museeks/actions/runs/8484717113 |
For anyone who comes here looking to upload artifacts to other locations, here is how I solved it to upload to S3. It's fairly simple once you understand that the This also becomes trickier with Windows builds that output paths like - uses: tauri-apps/tauri-action@v0
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
# Comment out tagName and releaseName to prevent automatically uploading to GH
# tagName: myapp-v__VERSION__
# releaseName: 'MyApp v__VERSION__'
includeUpdaterJson: false
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
includeDebug: true
args: ${{ matrix.settings.args }}
- name: Upload artifacts to AWS S3
if: matrix.settings.platform == 'macos-latest'
run: |
paths=$(echo '${{ steps.build.outputs.artifactPaths }}' | jq -c '.[]' | sed 's/"//g')
for fn in $paths; do
if [[ -f $fn ]]; then
echo "Uploading $fn"
aws s3 cp $fn s3://myBucketName/
fi
done
- name: Upload artifacts to AWS S3 (Windows)
if: matrix.settings.platform == 'windows-latest'
shell: pwsh
run: |
$jsonString = '${{ steps.build.outputs.artifactPaths }}'
$filePaths = ConvertFrom-Json $jsonString
foreach ($path in $filePaths) {
if (Test-Path $path -PathType Leaf) {
Write-Host "Uploading $path"
aws s3 cp $path s3://myBucketName/
} |
For now I use https://github.com/actions/upload-artifact to do the job.
It can be usefull to add an option to do the same thing.
WDYT ?
The text was updated successfully, but these errors were encountered: