fix(f): f #18
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: Create Github Releases | |
on: | |
push: | |
branches: | |
- "*" | |
jobs: | |
create-version-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
# Step 1: Check out the repository code | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- id: set-matrix | |
run: | | |
matrix="[" | |
for package_json in $(find ./packages -name package.json); do | |
version=$(jq -r .version "$package_json") | |
name=$(jq -r .name "$package_json") | |
matrix="${matrix}{\"name\":\"${name}\", \"version\":\"${version}\"}," | |
done | |
matrix="${matrix%,}" # Remove trailing comma | |
matrix="${matrix}]" # Close the JSON array | |
echo "matrix=${matrix}" >> $GITHUB_OUTPUT | |
create-github-release: | |
needs: create-version-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cfg: ${{fromJson(needs.create-version-matrix.outputs.matrix)}} | |
steps: | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: "${{ matrix.cfg.name }}@${{ matrix.cfg.version }}" |