-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.66 KB
/
generate-archives.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Archive generation
on:
release:
types: [created]
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
read_batches:
runs-on: ubuntu-latest
outputs:
batches: ${{ steps.read_batches.outputs.batches }}
steps:
- name: Checkout self
uses: actions/checkout@v2
- name: Read study-batches.txt
id: read_batches
run: |
BATCHES=$(printf "\"%s\"," $(cat study-batches.txt) | sed "s/^/[/;s/,$/]/")
echo "::set-output name=batches::$BATCHES"
- name: Get release
id: get_release
uses: bruceadams/[email protected]
- name: Upload study-batches.txt
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: study-batches.txt
asset_name: study-batches.txt
asset_content_type: application/octet-stream
main:
runs-on: ubuntu-latest
needs: read_batches
strategy:
matrix:
batch: ${{ fromJson(needs.read_batches.outputs.batches) }}
steps:
- name: Get release
id: get_release
uses: bruceadams/[email protected]
- name: Checkout self
uses: actions/checkout@v2
- name: zip directory
run: zip -r output.zip ${{ matrix.batch }}
- name: Upload .zip
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: output.zip
asset_name: ${{ matrix.batch }}.zip
asset_content_type: application/octet-stream