Skip to content

fix(bash script): fix bash script #6

fix(bash script): fix bash script

fix(bash script): fix bash script #6

Workflow file for this run

name: Version Check and Tag
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
- name: Create Version Matrix
id: set-matrix
run: |
CURRENT_VERSIONS="["
for package_json in $(find ./packages -name package.json); do
version=$(jq -r .version "$package_json")
CURRENT_VERSIONS="${CURRENT_VERSIONS}{\"version\":\"${version}\"},"
done
CURRENT_VERSIONS="${CURRENT_VERSIONS%,}" # Remove trailing comma
CURRENT_VERSIONS="${CURRENT_VERSIONS}]" # Close the JSON array
echo "CURRENT_VERSIONS=${CURRENT_VERSIONS}" >> $GITHUB_ENV
create_github_release:
needs: create_version_matrix
runs-on: ubuntu-latest
strategy:
matrix:
cfg: ${{fromJson(needs.create_version_matrix.outputs.CURRENT_VERSIONS)}}
steps:
- run: |
echo "Run GH release for ${{ matrix.cfg.version }}"