Signing #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core Desktop | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
targetplatform: [x64] | |
runs-on: windows-latest # For a list of available runner types, refer to | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
permissions: | |
contents: "write" | |
packages: "write" | |
pull-requests: "read" | |
env: | |
Solution_Name: DLSSUpdater.sln # Replace with your solution name, i.e. MyWpfApp.sln. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Create the package | |
run: dotnet publish --configuration Release ${Solution_Name} --self-contained false -p:PublishSingleFile=True -p:PublishReadyToRun=False --output bin\fire\out | |
- name: Get version of the project | |
id: project-version | |
uses: 'euberdeveloper/ga-project-version@main' | |
with: | |
path: DlssUpdater\version.json | |
- name: Build artifact | |
id: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release | |
path: bin\fire\out | |
- name: Sign the artifact | |
id: Signing | |
uses: signpath/github-action-submit-signing-request@v1 | |
with: | |
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | |
organization-id: '755fc32c-cfd8-4e3a-9ece-1a337dd6e8c3' | |
project-slug: 'DlssUpdater' | |
signing-policy-slug: 'release-signing' | |
github-artifact-id: '${{steps.Artifact.outputs.artifact-id}}' | |
wait-for-completion: true | |
output-artifact-directory: './signed-artifacts' | |
parameters: | | |
Version: ${{ toJSON(steps.project-version.outputs.version) }} | |
Release_Tag: "v${{ steps.project-version.outputs.version }}" | |
- name: Zip Release | |
uses: vimtor/[email protected] | |
with: | |
files: ./signed-artifacts | |
recursive: true | |
dest: dlssupdater.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# with permissions to create releases in the other repo | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: v${{ steps.project-version.outputs.version }} | |
tag_name: v${{ steps.project-version.outputs.version }} | |
draft: false | |
prerelease: false | |
fail_on_unmatched_files: true | |
files: | | |
./DlssUpdater/version.json | |
./dlssupdater.zip | |
- uses: sarisia/actions-status-discord@v1 | |
if: success() | |
with: | |
webhook: ${{ secrets.WEBHOOK_URL }} | |
nodetail: true | |
title: "New version of `Dlss Updater` is ready!" | |
description: | | |
Version `${{ steps.project-version.outputs.version }}` | |
Download directly inside `Dlss Updater` or [here](${{ steps.create_release.outputs.html_url }}). | |
color: 0xff91a4 |