Skip to content

Feature/ci workflow #10

Feature/ci workflow

Feature/ci workflow #10

Workflow file for this run

name: CI
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: fozztexx/defoogi:1.4.2
outputs:
files: ${{ steps.list_zips.outputs.files }}
steps:
- uses: actions/checkout@v4
- name: Build release files
run: make release
- name: List zip files
id: list_zips
shell: bash
run: |
shopt -s nullglob
files=(dist/*.zip)
# Remove directory from filenames
for i in "${!files[@]}"; do
files[$i]=$(basename "${files[$i]}")
done
# Convert to JSON array
printf -v files_json '%s,' "${files[@]}"
files_json="[${files_json%,}]"
echo "files=$files_json" >> $GITHUB_OUTPUT
- name: Upload dist folder for next job
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
upload:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{ fromJson(needs.build.outputs.files) }}
steps:
- uses: actions/checkout@v4
- name: Download dist folder
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Upload individual artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file }}
path: dist/${{ matrix.file }}