upload-artifact v4 #19
Workflow file for this run
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 and test gitco.NET | |
| on: [push] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dotnet-version: | |
| - '10.0.x' | |
| image: | |
| - windows-latest | |
| - ubuntu-latest | |
| - macos-latest | |
| include: | |
| - image: windows-latest | |
| runtime: win-x64 | |
| extension: .exe | |
| - image: ubuntu-latest | |
| runtime: linux-x64 | |
| extension: "" | |
| - image: macos-latest | |
| runtime: osx-arm64 | |
| extension: "" | |
| runs-on: ${{ matrix.image }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Install dependencies | |
| run: dotnet restore -v normal | |
| - name: Build | |
| run: dotnet build -v normal -c Release | |
| - name: Test with dotnet | |
| run: dotnet test -v normal | |
| - name: Publish framework-dependent | |
| run: dotnet publish -v normal -c Release -o publishFD -r ${{ matrix.runtime }} --no-self-contained gitco.NET/gitco.NET.csproj | |
| - name: Publish self-contained | |
| run: dotnet publish -v normal -c Release -o publishSC -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true gitco.NET/gitco.NET.csproj | |
| - name: Upload framework-dependent | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gitco_${{ matrix.runtime }}${{ matrix.extension }} | |
| path: publishFD/gitco${{ matrix.extension }} | |
| - name: Upload self-contained | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gitco_${{ matrix.runtime }}_self-contained${{ matrix.extension }} | |
| path: publishSC/gitco${{ matrix.extension }} |