Remove MarketingOptIn from the stack (#77) #197
This file contains hidden or 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: Build, Test, and Publish | |
| env: | |
| DOTNET_VERSION: '10' | |
| NODE_VERSION: '22' | |
| ANGULAR_PROJECT_NAME: 'lightnap-ng' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "build-test-publish" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: vars.RUN_BUILD_TEST_PUBLISH == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Build and test the back-end | |
| working-directory: src | |
| run: | | |
| dotnet restore | |
| dotnet test | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install front-end dependencies | |
| working-directory: src/${{ env.ANGULAR_PROJECT_NAME }} | |
| run: npm install | |
| - name: Run front-end tests | |
| working-directory: src/${{ env.ANGULAR_PROJECT_NAME }} | |
| run: npm run test:ci | |
| - name: Build front-end app and deploy into back-end site | |
| working-directory: src/${{ env.ANGULAR_PROJECT_NAME }} | |
| run: npm run deploy | |
| - name: Publish back-end app | |
| working-directory: src | |
| run: dotnet publish --configuration Release | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: src/publish |