Skip to content

Change init command to set (#5) #2

Change init command to set (#5)

Change init command to set (#5) #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: write
env:
ASSEMBLY_NAME: wcm_${{ github.ref_name }}_amd64
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
working-directory: Keeper.WindowsCredentialManager
run: dotnet restore
- name: Build
working-directory: Keeper.WindowsCredentialManager
run: |
dotnet build `
--no-restore `
--configuration Release `
/p:AssemblyName=${{ env.ASSEMBLY_NAME }}
- name: Publish
working-directory: Keeper.WindowsCredentialManager
run: |
dotnet publish `
--no-build `
--configuration Release `
--output ..\publish `
/p:AssemblyName=${{ env.ASSEMBLY_NAME }}
- name: Create checksum
run: |
$FileHash = (Get-FileHash publish\${{ env.ASSEMBLY_NAME }}.exe -Algorithm SHA256).Hash
New-Item -Path publish\checksums.txt -Value "$FileHash ${{ env.ASSEMBLY_NAME }}.exe" -Force
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" `
--title "${{ github.ref_name }}" `
--repo "${{ github.repository }}" `
--generate-notes
- name: Upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" `
--repo "${{ github.repository }}" `
(Get-Item publish\${{ env.ASSEMBLY_NAME }}.exe).FullName `
(Get-Item publish\checksums.txt).FullName