forked from kliment/Printrun
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 966 Bytes
/
upload-assets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"]'