Skip to content

Feature/ci workflow

Feature/ci workflow #4

Workflow file for this run

name: CI
on:
push:
tags:
- "v*"
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: fozztexx/defoogi:1.4.2
steps:
- uses: actions/checkout@v4
- name: Build release files
run: make release
# Gather the list of .zip files for the matrix
- name: List zip files
id: zips
run: |
echo "files=$(ls dist/*.zip | xargs -n1 basename | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
upload:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{ fromJson(needs.build.outputs.files) }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Upload ${{ matrix.file }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file }}
path: dist/${{ matrix.file }}
tagged-release:
runs-on: ubuntu-latest
needs: upload
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Create Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}