-
Notifications
You must be signed in to change notification settings - Fork 13
63 lines (56 loc) · 1.73 KB
/
windows.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
name: Build for Windows
on:
workflow_dispatch:
pull_request:
types: ['opened', 'reopened', 'synchronize', 'ready_for_review']
paths:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build:
name: Build on self-hosted
runs-on: m2mini-win11
permissions:
contents: write
defaults:
run:
# ./ is the repo root
working-directory: ./
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Get version
run: |
$version = ./Get-ProjectVersion.ps1 -ProjectPath BrowseRouter
echo "VERSION=$version" >> $env:GITHUB_ENV
- name: Get PR URL
run: |
$pr = ${{ github.event.pull_request.number }}
$url = "https://github.com/nref/BrowseRouter/pull/$pr"
echo "PR_URL=$url" >> $env:GITHUB_ENV
- name: Get PR Title
run: |
PR_DESCRIPTION=$(gh pr view $env:PR_URL --json title -q .title)
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get PR Description
run: |
PR_DESCRIPTION=$(gh pr view $env:PR_URL --json body -q .body)
echo "PR_DESCRIPTION=$PR_DESCRIPTION" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and sign
run: pwsh ./make.ps1
- uses: ncipollo/release-action@v1
with:
artifacts: "./Releases/**/*.zip"
draft: true
allowUpdates: true
tag: $env:VERSION
name: "$env:VERSION - $env:PR_TITLE"
body: $env:PR_DESCRIPTION