fix(upgarde): upgarde git commands #12
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: 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@v2 | |
# 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 | |
# env: # Set the environment variable for the matrix | |
# MATRIX: ${{ steps.set-matrix.outputs.matrix }} | |
# strategy: | |
# matrix: | |
# cfg: ${{fromJson(env.MATRIX)}} | |
# steps: | |
# - run: | | |
# echo "Run GH release for ${{ matrix.cfg.version }}" | |
job1: | |
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@v2 | |
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") | |
matrix="${matrix}{\"version\":\"${version}\"}," | |
done | |
matrix="${matrix%,}" # Remove trailing comma | |
matrix="${matrix}]" # Close the JSON array | |
echo "matrix=${matrix}" >> $GITHUB_ENV | |
builder: | |
needs: job1 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cfg: ${{fromJson(needs.job1.outputs.matrix)}} | |
steps: | |
- run: | | |
echo bin-${{ matrix.cfg.version }} |