Skip to content

Commit

Permalink
Update Github build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Jan 2, 2024
1 parent 609ccda commit cdf9e57
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 47 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/BuildOnly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,15 @@ name: AppBarButton.WPF CI-BuildOnly

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
branches-ignore:
- main

jobs:
build-and-release:

runs-on: windows-2022
windows-latest:
name: windows-latest
runs-on: windows-latest

steps:
- name: Get Current Visual Studio Information
shell: bash
run: |
dotnet tool update -g dotnet-vs
echo "## About RELEASE ##"
vs where release
- name: Update Visual Studio Latest Release
shell: bash
run: |
echo "## Update RELEASE ##"
vs update release Enterprise
vs modify release Enterprise +mobile +desktop +uwp +web
echo "## About RELEASE Updated ##"
vs where release
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -39,6 +22,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,16 @@ on:
branches: [ "main" ]

jobs:
build-and-release:

runs-on: windows-2022
windows-latest:
name: windows-latest
runs-on: windows-latest

permissions: write-all
environment:
name: release
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Get Current Visual Studio Information
shell: bash
run: |
dotnet tool update -g dotnet-vs
echo "## About RELEASE ##"
vs where release
- name: Update Visual Studio Latest Release
shell: bash
run: |
echo "## Update RELEASE ##"
vs update release Enterprise
vs modify release Enterprise +mobile +desktop +uwp +web
echo "## About RELEASE Updated ##"
vs where release
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -38,6 +26,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
Expand Down Expand Up @@ -65,13 +54,24 @@ jobs:
name: nuget
path: '**/*.nupkg'

- name: Changelog
uses: glennawatson/ChangeLog@v1
id: changelog

- name: NuGet Push
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
SOURCE_URL: https://api.nuget.org/v3/index.json
run: |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg --skip-duplicate
- name: Changelog
uses: glennawatson/ChangeLog@v1
id: changelog

- name: Create Release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.nbgv.outputs.SemVer2 }}
release_name: ${{ steps.nbgv.outputs.SemVer2 }}
body: |
${{ steps.changelog.outputs.commitLog }}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Nullable>enable</Nullable>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Configurations>Debug;Release;PreRelease</Configurations>
<Configurations>Debug;Release</Configurations>
<PackageReleaseNotes>Compatability with Net 6 / 7 and net462</PackageReleaseNotes>
<PackageTags>AppBarButton;WPF;UserControl;net;MaterialDesignIcons</PackageTags>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
Expand Down
2 changes: 1 addition & 1 deletion src/AppBarButton.WPF/AppBarButton.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<RootNamespace>CP</RootNamespace>
Expand Down

0 comments on commit cdf9e57

Please sign in to comment.