|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*" |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: windows-2022 |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v1 |
| 14 | + - uses: nuget/setup-nuget@v1 |
| 15 | + - run: nuget restore $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots_VS2022.sln |
| 16 | + - name: zip libraries |
| 17 | + run: | |
| 18 | + cd "$Env:GITHUB_WORKSPACE\Libraries\" |
| 19 | + 7z a -tzip -mx=9 $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots.zip * |
| 20 | + - name: Build Windows Showcase Forms example |
| 21 | + run: | |
| 22 | + cd $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots.Showcase.Forms |
| 23 | + dotnet publish -p:PublishProfile=FolderProfile |
| 24 | + - name: Build Console examples |
| 25 | + run: | |
| 26 | + cd $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots.Showcase.Console |
| 27 | + dotnet publish -p:PublishProfile=linux-arm |
| 28 | + dotnet publish -p:PublishProfile=linux-x64 |
| 29 | + dotnet publish -p:PublishProfile=osx-arm64 |
| 30 | + dotnet publish -p:PublishProfile=osx-x64 |
| 31 | + dotnet publish -p:PublishProfile=win-x64 |
| 32 | + dotnet publish -p:PublishProfile=win-x86 |
| 33 | + rm $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots.Showcase.Console\obj -r -fo |
| 34 | + cd $Env:GITHUB_WORKSPACE\UnderAutomation.UniversalRobots.Showcase.Console\bin\publish |
| 35 | + mv linux-arm/UnderAutomation.UniversalRobots.Showcase.Console linux-arm/UnderAutomation.UniversalRobots.Showcase.Console.linux-arm |
| 36 | + mv linux-x64/UnderAutomation.UniversalRobots.Showcase.Console linux-x64/UnderAutomation.UniversalRobots.Showcase.Console.linux-x64 |
| 37 | + mv win-x64/UnderAutomation.UniversalRobots.Showcase.Console.exe win-x64/UnderAutomation.UniversalRobots.Showcase.Console.win-x64.exe |
| 38 | + mv win-x86/UnderAutomation.UniversalRobots.Showcase.Console.exe win-x86/UnderAutomation.UniversalRobots.Showcase.Console.win-x86.exe |
| 39 | + mv osx-arm64/UnderAutomation.UniversalRobots.Showcase.Console osx-arm64/UnderAutomation.UniversalRobots.Showcase.Console.osx-arm64 |
| 40 | + mv osx-x64/UnderAutomation.UniversalRobots.Showcase.Console osx-x64/UnderAutomation.UniversalRobots.Showcase.Console.osx-x64 |
| 41 | + - uses: ncipollo/release-action@v1 |
| 42 | + with: |
| 43 | + artifacts: | |
| 44 | + UnderAutomation.UniversalRobots.zip |
| 45 | + **/publish/**/UnderAutomation.UniversalRobots.Showcase.*.exe |
| 46 | + **/UnderAutomation.UniversalRobots.Showcase.Console.linux-* |
| 47 | + **/UnderAutomation.UniversalRobots.Showcase.Console.osx-* |
| 48 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments