UI: use latest winforms submodule #371
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 App | |
| on: [ push, pull_request ] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Inject slug/short variables | |
| uses: rlespinasse/github-slug-action@v3.x | |
| - name: Get current date | |
| id: date | |
| run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
| - name: Set version string | |
| id: ver | |
| run: echo "::set-output name=ver::DiztinGUIsh-${{ steps.date.outputs.date }}--${{ env.GITHUB_REF_SLUG }}-${{ env.GITHUB_SHA_SHORT }}-${{env.GITHUB_REPOSITORY_OWNER_PART_SLUG != 'isofrieze' && env.GITHUB_REPOSITORY_OWNER_PART_SLUG || 'official'}}" | |
| - name: Print version | |
| run: echo "version ${{ steps.ver.outputs.ver }}" | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 9.0.x | |
| # not currently working consistently, don't cache | |
| # - name: Nuget (restore from cache) | |
| # uses: actions/cache@v1 | |
| # id: cache | |
| # with: | |
| # path: ~/.nuget/packages | |
| # key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| # | |
| # - name: NuGet (Restore from scratch if needed) | |
| # if: steps.cache.outputs.cache-hit != 'true' | |
| # run: dotnet restore --locked-mode | |
| - name: NuGet (Restore always from scratch) | |
| run: dotnet restore --locked-mode | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test | |
| run: dotnet test --no-build --configuration Release | |
| # removed --no-restore on this for simplicity. it's a little more wasteful potentially though | |
| - name: Publish | |
| run: dotnet publish -c Release -r win-x64 --self-contained true /p:PublishProfile=FolderProfile /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true .\Diz.App.Winforms | |
| - uses: vimtor/action-zip@v1.2 | |
| with: | |
| files: Diz.App.Winforms\bin\Release\net9.0-windows\publish\ | |
| dest: ${{ steps.ver.outputs.ver }}.zip | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.ver.outputs.ver }}.zip | |
| path: ${{ steps.ver.outputs.ver }}.zip | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: ${{ steps.ver.outputs.ver }}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |