Skip to content

Commit

Permalink
refactor: Update build and publish command
Browse files Browse the repository at this point in the history
- Updated the build and publish command in the release workflow to include the project version, debug type, debug symbols, and ready-to-run flag. Also added the project description, company name, copyright information, and assembly title in the GenerateYKCSR.csproj file.
- The new command enhances the build process and provides more accurate details for the YubiKey CSR Generator tool.

Signed-off-by: Bryan Gonzalez <[email protected]>
  • Loading branch information
SheepReaper committed Oct 7, 2023
1 parent d3014be commit 39d58b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
dotnet-version: "8.0"

- name: Build
run: dotnet publish /p:DebugType=None /p:DebugSymbols=false /p:PublishReadyToRun=true -c Release -r ${{ matrix.target }} --self-contained -o out/${{ matrix.target }} -- ./src/yk-csr-cli/GenerateYKCSR.csproj
run: dotnet publish -c Release --self-contained -p:DebugType=None -p:DebugSymbols=false -p:PublishReadyToRun=true -p:Version=${{ github.event.release.tag_name }} -r ${{ matrix.target }} -o out/${{ matrix.target }} -- ./src/yk-csr-cli/GenerateYKCSR.csproj

- name: Archive and Hash
run: |
zip -r ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }} -j
sha256sum ./out/${{ matrix.target }}.zip > ./out/${{ matrix.target }}.zip.sha256
- name: Upload
run: gh release upload ${{github.event.release.tag_name}} ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }}.zip.sha256 --clobber
run: gh release upload ${{ github.event.release.tag_name }} ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }}.zip.sha256 --clobber
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
8 changes: 7 additions & 1 deletion src/yk-csr-cli/GenerateYKCSR.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>CLI tool for generating CSRs using YubiKey hardware tokens with PIV support.</Description>
<Company>Bryan Gonzalez</Company>
<Copyright>© 2023-$([System.DateTime]::Now.Year) $(Company)</Copyright>
<AssemblyTitle>YubiKey CSR Generator</AssemblyTitle>
</PropertyGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<VersionPrefix>1.0.0</VersionPrefix>
<UseAppHost>true</UseAppHost>
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
Expand Down

0 comments on commit 39d58b1

Please sign in to comment.