-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automate uploading of assets on releases
- Loading branch information
1 parent
b382917
commit d795d48
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Upload Assets to Releases | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
upload_release_assets: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
checks: write | ||
actions: read | ||
issues: read | ||
packages: write | ||
pull-requests: read | ||
repository-projects: read | ||
statuses: read | ||
steps: | ||
- name: Get artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: printrun-* | ||
path: upload | ||
merge-multiple: false | ||
|
||
- name: Zip artifacts for uploading | ||
run: | | ||
cd upload || { echo "Failed to cd into 'upload'"; exit 1; } | ||
for i in *; do | ||
cd "$i" || { echo "Failed to cd into '$i'"; exit 1; } | ||
zip -r "../$i.zip" ./* | ||
cd .. | ||
done | ||
- name: Upload assets | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
asset_paths: '["upload/*.zip"]' |