@@ -12,32 +12,34 @@ jobs:
1212 max-parallel : 4
1313 fail-fast : true
1414 matrix :
15- example :
16- [
17- ibc-asset-list,
18- vote-proposal,
19- ibc-transfer,
20- swap-tokens,
21- provide-liquidity,
22- connect-chain,
23- connect-multi-chain,
24- ]
15+ include :
16+ - name : authz
17+ folder : examples
18+ - name : ibc-asset-list
19+ folder : examples
20+ - name : injective
21+ folder : examples
22+ - name : injective-vue
23+ folder : examples
24+ - name : stake-tokens
25+ folder : examples
26+ - name : vote-proposal
27+ folder : examples
28+ - name : chain-template
29+ folder : templates
30+ - name : connect-chain
31+ folder : templates
32+ - name : connect-multi-chain
33+ folder : templates
2534
2635 steps :
2736 - name : Checkout repository
2837 uses : actions/checkout@v4
2938
3039 - name : Set template_path Environment Variable
3140 run : |
32- example_value="${{ matrix.example }}"
33-
34- if [[ "$example_value" == "connect-chain" ]] || [[ "$example_value" == "connect-multi-chain" ]]; then
35- echo "template_path=templates" >> $GITHUB_ENV
36- echo "ci_template_path=dest" >> $GITHUB_ENV
37- else
38- echo "template_path=examples" >> $GITHUB_ENV
39- echo "ci_template_path=dest" >> $GITHUB_ENV
40- fi
41+ echo "template_path=${{ matrix.folder }}" >> $GITHUB_ENV
42+ echo "ci_template_path=dest" >> $GITHUB_ENV
4143
4244 - name : Log
4345 run : |
@@ -46,11 +48,10 @@ jobs:
4648
4749 - name : Clone example
4850 run : |
49- echo "Cloning example: ./$template_path/${{ matrix.example }}/" into "${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
50-
51- mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
52- cp -r ./$template_path/${{ matrix.example }}/ ${{ github.workspace }}/$ci_template_path/
53- cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
51+ echo "Cloning example: ./$template_path/${{ matrix.name }}/ into ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}"
52+ mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
53+ cp -r ./$template_path/${{ matrix.name }}/ ${{ github.workspace }}/$ci_template_path/
54+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
5455
5556 - name : Set up Node.js
5657 uses : actions/setup-node@v4
@@ -69,17 +70,14 @@ jobs:
6970 with :
7071 path : |
7172 ${{ github.workspace }}/.next/cache
72- # Generate a new cache whenever packages or source files change.
73- # key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
7473 key : ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ env.DIFF_HASH }}
75- # If source files changed but packages didn't, rebuild from a prior cache.
7674 restore-keys : |
7775 ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
7876
7977 - name : Build example project
8078 run : |
81- echo "Building example: ${{ matrix.example }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
82- cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
79+ echo "Building example: ${{ matrix.name }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}"
80+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.name }}
8381 ls -la
8482 yarn install
85- yarn build
83+ yarn build
0 commit comments