Prexonite, a .NET hosted scripting language with a focus on meta-programming and embedded DSLs
0

Configure Feed

Select the types of activity you want to include in your feed.

PRX-48: zip and add windows binary

Also:
- upgrade to windows-2022

authored by

Christian Klauser and committed by
Christian Klauser
(Apr 6, 2022, 8:59 PM +0200) c263e176 704201e5

+73 -58
+1 -1
.github/workflows/PrxCi.yml
··· 26 26 - linux 27 27 include: 28 28 - os: windows 29 - build_platform: windows-2019 29 + build_platform: windows-2022 30 30 - os: linux 31 31 build_platform: ubuntu-20.04 32 32 name: Build & Test Prexonite on ${{ matrix.os }}
+59 -43
.github/workflows/PrxRelease.yml
··· 7 7 8 8 jobs: 9 9 build: 10 - name: Release Prexonite 11 - runs-on: windows-2019 10 + strategy: 11 + matrix: 12 + os: 13 + - windows 14 + - linux 15 + include: 16 + - os: windows 17 + build_platform: windows-2022 18 + runtime_ident: win-x64 19 + - os: linux 20 + build_platform: ubuntu-20.04 21 + runtime_ident: linux-x64 22 + name: Release Prexonite on ${{ matrix.os }} 23 + runs-on: ${{ matrix.build_platform }} 24 + permissions: 25 + contents: write # required for creating a release 26 + env: 27 + DOTNET_NOLOGO: true 12 28 13 29 steps: 14 30 - name: Determine version ··· 25 41 shell: bash 26 42 - uses: actions/checkout@v2 27 43 - name: Setup .NET 6 SDK 28 - uses: actions/setup-dotnet@v1.7.2 29 - env: 30 - NUGET_AUTH_TOKEN: '${{secrets.GITHUB_TOKEN}}' 44 + uses: actions/setup-dotnet@v2 31 45 with: 32 - dotnet-version: '6.0.x' 46 + # dotnet 5.0 is still required for T4 47 + dotnet-version: | 48 + 6.0.x 49 + 5.0.x 33 50 source-url: 'https://nuget.pkg.github.com/chklauser/index.json' 34 - - name: Setup .NET 5 SDK (for T4) 35 - uses: actions/setup-dotnet@v1.7.2 36 51 env: 37 - NUGET_AUTH_TOKEN: '${{secrets.GITHUB_TOKEN}}' 38 - with: 39 - dotnet-version: '5.0.x' 40 - source-url: 'https://nuget.pkg.github.com/chklauser/index.json' 52 + NUGET_AUTH_TOKEN: '${{secrets.CICD_PAT}}' 53 + - name: NuGet login for publishing 54 + run: | 55 + dotnet nuget update source --username chklauser --password '${{secrets.CICD_PAT}}' --store-password-in-clear-text chklauser 56 + shell: bash 41 57 - uses: actions/cache@v2 42 58 with: 43 59 path: ~/.nuget/packages ··· 46 62 restore-keys: | 47 63 ${{ runner.os }}-nuget 48 64 - name: Install dependencies 49 - run: dotnet restore --lock-file-path=./packages.lock.json --verbosity=normal 65 + run: dotnet restore --runtime ${{ matrix.runtime_ident }} --lock-file-path=./packages.lock.json --verbosity=normal 50 66 - name: Install tools 51 67 run: dotnet tool restore --verbosity=normal 52 68 - name: Build 53 69 run: dotnet build --configuration=Release --no-restore --verbosity=normal -p:Version=${{steps.determine-version.outputs.version}} 54 70 - name: Test 55 71 run: dotnet test --configuration=Release --no-restore --no-build --verbosity=normal -p:Version=${{steps.determine-version.outputs.version}} 56 - - name: Pack 72 + - name: Pack (windows-only) 73 + if: matrix.os == 'windows' 57 74 run: dotnet pack --configuration=Release --no-restore --no-build --verbosity=normal -p:Version=${{steps.determine-version.outputs.version}} 58 75 - name: Publish 59 - run: dotnet publish --configuration=Release --no-restore --no-build --verbosity=normal -p:Version=${{steps.determine-version.outputs.version}} 60 - # - name: Prepare Binary ZIP 61 - # run: | 62 - # ver='${{steps.determine-version.outputs.version}}' 63 - # cd Prx/bin/Release/net5.0/ && \ 64 - # mkdir zip-env && \ 65 - # mv publish "zip-env/prexonite-v$ver" 66 - # shell: bash 67 - # - name: Binary ZIP 68 - # uses: thedoctor0/zip-release@0.4.1 69 - # with: 70 - # filename: prexonite-v${{steps.determine-version.outputs.version}} 71 - # directory: Prx/bin/Release/net5.0/zip-env 72 - - name: Push Prexonite Package 76 + run: dotnet publish --configuration=Release --runtime ${{ matrix.runtime_ident }} --verbosity=normal -p:Version=${{steps.determine-version.outputs.version}} 77 + - name: Prepare Binary ZIP 78 + run: | 79 + ver='${{steps.determine-version.outputs.version}}' 80 + cd Prx/bin/Release/net6.0/${{ matrix.runtime_ident }} && \ 81 + mkdir zip-env && \ 82 + mv publish "zip-env/prexonite-v$ver" 83 + shell: bash 84 + - name: Binary ZIP 85 + uses: thedoctor0/zip-release@0.6.1 86 + with: 87 + filename: prexonite-v${{steps.determine-version.outputs.version}}-${{ matrix.runtime_ident }}.zip 88 + directory: Prx/bin/Release/net6.0/${{ matrix.runtime_ident }}/zip-env 89 + - name: Push Prexonite Package (windows-only) 90 + if: matrix.os == 'windows' 73 91 run: dotnet nuget push Prexonite/bin/Release/Prexonite.${{steps.determine-version.outputs.version}}.nupkg 74 - - name: Push Prexonite Symbols Package 92 + - name: Push Prexonite Symbols Package (windows-only) 93 + if: matrix.os == 'windows' 75 94 run: dotnet nuget push Prexonite/bin/Release/Prexonite.${{steps.determine-version.outputs.version}}.snupkg 76 - - name: Push Prx Package 95 + - name: Push Prx Package (windows-only) 96 + if: matrix.os == 'windows' 77 97 run: dotnet nuget push Prx/bin/Release/Prx.${{steps.determine-version.outputs.version}}.nupkg 78 - - name: Push Prx Symbols Package 98 + - name: Push Prx Symbols Package (windows-only) 99 + if: matrix.os == 'windows' 79 100 run: dotnet nuget push Prx/bin/Release/Prx.${{steps.determine-version.outputs.version}}.snupkg 80 - - name: Create Release 81 - uses: softprops/action-gh-release@v1 82 - env: 83 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 101 + - name: Create Release 102 + uses: ncipollo/release-action@v1.10.0 84 103 with: 104 + allowUpdates: true 105 + artifacts: '**/Prexonite*.nupkg,**/Prexonite*.snupkg,**/Prx*.nupkg,**/Prx*.snupkg,**/prexonite-v*.zip' 85 106 draft: true 86 - name: ${{steps.determine-version.outputs.version}} 87 - fail_on_unmatched_files: true 88 - files: | 89 - **/Prexonite*.nupkg 90 - **/Prexonite*.snupkg 91 - **/Prx*.nupkg 92 - **/Prx*.snupkg 93 - 107 + generateReleaseNotes: true 108 + omitBodyDuringUpdate: true 109 + omitDraftDuringUpdate: true
+1 -1
.github/workflows/PxCocoCi.yml
··· 17 17 jobs: 18 18 build: 19 19 name: Build PxCoco (CI) 20 - runs-on: windows-2019 20 + runs-on: windows-2022 21 21 22 22 steps: 23 23 - uses: actions/checkout@v2
+11 -10
.github/workflows/PxCocoRelease.yml
··· 11 11 jobs: 12 12 release: 13 13 name: Build and Release PxCoco 14 - runs-on: windows-2019 14 + runs-on: windows-2022 15 15 permissions: 16 16 packages: write 17 17 contents: read ··· 31 31 - name: Setup .NET 6 SDK 32 32 uses: actions/setup-dotnet@v1.7.2 33 33 env: 34 - NUGET_AUTH_TOKEN: '${{secrets.GITHUB_TOKEN}}' 34 + NUGET_AUTH_TOKEN: '${{secrets.CICD_PAT}}' 35 35 with: 36 - dotnet-version: '6.0.x' 36 + # version 5.0 used for T4 37 + dotnet-version: | 38 + 6.0.x 39 + 5.0.x 37 40 source-url: 'https://nuget.pkg.github.com/chklauser/index.json' 38 - - name: Setup .NET 5 SDK (for T4) 39 - uses: actions/setup-dotnet@v1.7.2 40 - env: 41 - NUGET_AUTH_TOKEN: '${{secrets.GITHUB_TOKEN}}' 42 - with: 43 - dotnet-version: '5.0.x' 44 - source-url: 'https://nuget.pkg.github.com/chklauser/index.json' 41 + - name: NuGet login for publishing 42 + run: | 43 + # Need to switch to a personal access token to publish. Doesn't work when done through actions/setup-dotnet 44 + dotnet nuget update source --username chklauser --password '${{secrets.CICD_PAT}}' --store-password-in-clear-text chklauser 45 + shell: bash 45 46 - name: Install dependencies (Win) 46 47 run: dotnet restore PxCoco/PxCoco.csproj 47 48 - name: Build (Win)
+1 -3
NuGet.Config
··· 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <configuration> 3 3 <packageSources> 4 - <clear/> 5 4 <add key="nuget" value="https://api.nuget.org/v3/index.json" /> 6 - <!-- Source is the same name as the dotnet-setup action uses --> 7 - <add key="Source" value="https://nuget.pkg.github.com/chklauser/index.json" /> 5 + <add key="chklauser" value="https://nuget.pkg.github.com/chklauser/index.json" /> 8 6 </packageSources> 9 7 </configuration>