v9.2.0c #60
Workflow file for this run
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
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 |