Skip to content

Implement New Features, Enhancements, and UI Update #38

Implement New Features, Enhancements, and UI Update

Implement New Features, Enhancements, and UI Update #38

Workflow file for this run

name: 'Build and publish release'
on:
push:
tags:
- '*'
jobs:
build-and-package:
strategy:
matrix:
include:
- platform: 'AnyCPU'
build_configuration: 'Release'
uwp_suffix: ''
- platform: 'AnyCPU'
build_configuration: 'Release'
uwp_suffix: '-no-uwp'
- platform: 'ARM64'
build_configuration: 'Release'
uwp_suffix: ''
if_main: 'true'
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout from GitHub
uses: actions/checkout@v3
with:
ref: ${{ (matrix.uwp_suffix == '') && github.ref || 'no-uwp' }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Install NuGet CLI
run: choco install nuget.commandline
- name: Restore NuGet Packages
run: nuget restore WireSockUI.sln
- name: Parse Version
shell: bash
run: |
# Strip "v" prefix from tag name
VERSION=$(echo ${{ github.ref_name }} | sed -e 's/^v//')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Build
run: msbuild WireSockUI/WireSockUI.csproj -t:rebuild -verbosity:minimal -property:Configuration=Release -property:Platform=${{ matrix.platform }} -property:Version=${{ env.VERSION }} -property:Repository=${{ github.repository }}
- name: Package Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'WireSockUI-${{ github.ref_name }}-${{ matrix.platform }}${{ matrix.uwp_suffix }}.zip'
directory: 'bin\exe\${{ matrix.platform }}\${{ matrix.build_configuration }}'
exclusions: '*.pdb'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.platform }}-artifact
path: 'bin\exe\${{ matrix.platform }}\${{ matrix.build_configuration }}\WireSockUI-${{ github.ref_name }}-${{ matrix.platform }}${{ matrix.uwp_suffix }}.zip'
upload-release:
if: ${{ always() }}
needs: build-and-package
runs-on: windows-latest
steps:
- name: Checkout from GitHub
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: 'artifacts'
- name: Parse Version
shell: bash
run: |
# Strip "v" prefix from tag name
VERSION=$(echo ${{ github.ref_name }} | sed -e 's/^v//')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: 'artifacts/**/*.zip'
name: 'WireSockUI-${{ github.ref_name }}'
tag: ${{ github.ref_name }}
token: ${{ secrets.MY_GITHUB_PAT }}
skipIfReleaseExists: true