Merge pull request #2 from tslashd/dependabot/github_actions/main/all… #23
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 API | |
| on: | |
| push: | |
| branches: [ "main", "dev" ] | |
| pull_request: | |
| branches: [ "main", "dev" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout API repo into subfolder | |
| uses: actions/checkout@v5 | |
| with: | |
| path: SurfTimer.Api | |
| - name: Checkout Shared repo (sibling folder) | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: tslashd/SurfTimer.Shared | |
| path: SurfTimer.Shared | |
| # if SurfTimer.Shared is private, provide PAT: | |
| # token: ${{ secrets.SHARED_REPO_PAT }} | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore | |
| run: dotnet restore SurfTimer.Api/SurfTimer.Api.sln | |
| - name: Build | |
| run: dotnet build SurfTimer.Api/SurfTimer.Api.sln -c Release --no-restore | |
| - name: Publish | |
| run: dotnet publish SurfTimer.Api/SurfTimer.Api.csproj -c Release -o out |