|
| 1 | +name: .NET Core |
| 2 | + |
| 3 | +env: |
| 4 | + MAJOR: 1 |
| 5 | + MINOR: 0 |
| 6 | + PATCH: 0 |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: [ features/init-commit ] |
| 11 | + pull_request: |
| 12 | + branches: [ main ] |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout GitHub actions |
| 18 | + uses: actions/checkout@v2 |
| 19 | + |
| 20 | + - name: Setup .NET Core 6.0.x |
| 21 | + uses: actions/setup-dotnet@v1 |
| 22 | + with: |
| 23 | + dotnet-version: 6.0.x |
| 24 | + |
| 25 | + - name: Install dependencies |
| 26 | + run: dotnet restore "./ChangeDetection.sln" |
| 27 | + |
| 28 | + - name: Build code |
| 29 | + run: dotnet build "./ChangeDetection.sln" --configuration Release --no-restore |
| 30 | + |
| 31 | + - name: Publish ConsoleApp for win-x86 |
| 32 | + run: dotnet publish "./src/ConsoleApp/ConsoleApp.csproj" -c Release -r win-x86 -p:PublishSingleFile=true --self-contained true -o win-x86 |
| 33 | + |
| 34 | + - name: Publish ConsoleApp for win-x64 |
| 35 | + run: dotnet publish "./src/ConsoleApp/ConsoleApp.csproj" -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true -o win-x64 |
| 36 | + |
| 37 | + - name: Publish ConsoleApp for linux-x64 |
| 38 | + run: dotnet publish "./src/ConsoleApp/ConsoleApp.csproj" -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true -o linux-x64 |
| 39 | + |
| 40 | + - name: Publish ConsoleApp for osx-x64 |
| 41 | + run: dotnet publish "./src/ConsoleApp/ConsoleApp.csproj" -c Release -r osx-x64 -p:PublishSingleFile=true --self-contained true -o osx-x64 |
| 42 | + |
| 43 | + - name: Upload win-x86 Artifacts |
| 44 | + uses: actions/upload-artifact@v2 |
| 45 | + with: |
| 46 | + name: ConsoleApp win-x86 |
| 47 | + path: "./win-x86" |
| 48 | + |
| 49 | + - name: Upload win-x64 Artifacts |
| 50 | + uses: actions/upload-artifact@v2 |
| 51 | + with: |
| 52 | + name: ConsoleApp win-x64 |
| 53 | + path: "./win-x64" |
| 54 | + |
| 55 | + - name: Upload linux-x64 Artifacts |
| 56 | + uses: actions/upload-artifact@v2 |
| 57 | + with: |
| 58 | + name: ConsoleApp linux-x64 |
| 59 | + path: "./linux-x64" |
| 60 | + |
| 61 | + - name: Upload osx-x64 Artifacts |
| 62 | + uses: actions/upload-artifact@v2 |
| 63 | + with: |
| 64 | + name: ConsoleApp osx-x64 |
| 65 | + path: "./osx-x64" |
0 commit comments