-
-
Notifications
You must be signed in to change notification settings - Fork 6
115 lines (97 loc) · 3.51 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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: './release.zip'
parameters: |
Version: ${{ toJSON(steps.project-version.outputs.version) }}
Release_Tag: "v${{ steps.project-version.outputs.version }}"
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.project-version.outputs.version }}
release_name: v${{ steps.project-version.outputs.version }}
draft: false
prerelease: false
- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release.zip
asset_name: dlssupdater.zip
asset_content_type: application/zip
- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./DlssUpdater/version.json
asset_name: version.json
asset_content_type: application/json
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
- 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