Skip to content

Fix syntax error

Fix syntax error #6

name: Create Artifacts on Push
on:
push:
branches:
- alek/artifacts # Specify the branches you want to trigger this action on
jobs:
zip-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup zip utility
run: sudo apt-get install -y zip
- name: List subfolders and prepare for matrix
id: prepare_matrix
run: |
folders=$(ls -d */ | sed 's#/##')
echo "folders=$folders" >> $GITHUB_ENV
echo "::set-output name=matrix::$(echo $folders | jq -c -R 'split(" ")')"
upload-artifacts:
needs: zip-and-publish
runs-on: ubuntu-latest
strategy:
matrix:
folder: ${{ fromJson(needs.zip-and-publish.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup zip utility
run: sudo apt-get install -y zip
- name: Zip the folder
run: zip -r "${{ matrix.folder }}.zip" "${{ matrix.folder }}"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.folder }}
path: ${{ matrix.folder }}.zip