Update main.yml #40
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: Default workflow | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-dotnet: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: [RandomGen, NameGenerator] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build ${{ matrix.project }} | |
build-cdk: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: [cost-budget-cdk, s3-backup-cdk] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: ${{ matrix.project }}/package-lock.json | |
- name: npm install, build, and synth | |
run: | | |
npm install -g aws-cdk | |
cd ${{ matrix.project }} | |
npm ci | |
npm run build | |
cdk synth |