Skip to content

use latest dizlogwriter #239

use latest dizlogwriter

use latest dizlogwriter #239

Workflow file for this run

name: Build .NET6 Windows Desktop App
on: [ push, pull_request ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- 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: 6.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
- name: Publish
run: dotnet publish --no-build -c Release /p:PublishProfile=FolderProfile .\DiztinGUIsh\
- uses: vimtor/action-zip@v1
with:
files: DiztinGUIsh\bin\Release\net6.0-windows7.0\publish\
dest: ${{ steps.ver.outputs.ver }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v2
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 }}