fix(github): extract feature parameters in the build-fixtures action #146
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: Build and Package Fixtures | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
tags-ignore: | ||
- '*@*' | ||
workflow_dispatch: | ||
jobs: | ||
features: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
features: ${{ steps.parse.outputs.features }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get names from config-feature.yaml | ||
id: parse | ||
shell: bash | ||
run: | | ||
echo "features=$(grep -Po "^[0-9a-zA-Z_\-]+" ./config-feature.yaml | jq -R . | jq -cs .)" >> "$GITHUB_OUTPUT" | ||
build: | ||
needs: features | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
name: ${{ fromJson(needs.features.outputs.features) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: ./.github/actions/build-fixtures | ||
with: | ||
name: ${{ matrix.name }} | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: . | ||
- name: Draft Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: './**' | ||
draft: true | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true |