Skip to content

v9.2.0c

v9.2.0c #60

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@v4
- name: Read study-batches.txt
id: read_batches
run: |
BATCHES=$(printf "\"%s\"," $(cat study-batches.txt) | sed "s/^/[/;s/,$/]/")
echo "batches=$BATCHES" >> $GITHUB_OUTPUT
- name: Upload study-batches.txt
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.ref_name }}
run: |
gh release upload "$tag" study-batches.txt
main:
runs-on: ubuntu-latest
needs: read_batches
strategy:
matrix:
batch: ${{ fromJson(needs.read_batches.outputs.batches) }}
steps:
- name: Checkout self
uses: actions/checkout@v4
- name: zip directory
run: zip -r ${{ matrix.batch }}.zip ${{ matrix.batch }}
- name: Upload .zip
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.ref_name }}
run: |
gh release upload "$tag" ${{ matrix.batch }}.zip