-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (63 loc) · 2.23 KB
/
release.yaml
File metadata and controls
71 lines (63 loc) · 2.23 KB
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
name: Publish new release
on:
release:
types: [published]
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
version-detection:
runs-on: ubuntu-latest
outputs:
version-num: ${{ steps.set-version-number.outputs.VERSION_NUM }}
steps:
- id: set-version-number
name: Set version number
run: |
TAG="${{ github.ref_name }}"
VERSION_NUM="${TAG:1}"
echo "VERSION_NUM=$VERSION_NUM" >> "$GITHUB_OUTPUT"
build:
needs: version-detection
runs-on: windows-2022
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
with:
token: ${{ github.token }}
- name: Setup devenv
run: |
$productPath = & vswhere.exe '-property' productPath
$devenv = $productPath.Replace(".exe", ".com")
$installPath = & vswhere.exe '-property' installationPath
$disablePath = $installPath + '\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild'
"DEVENV=$devenv" | Out-File -FilePath $env:GITHUB_ENV -Append
"DISABLE_PATH=$disablePath" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Disable OutOfProcBuild
run: ./DisableOutOfProcBuild.exe
working-directory: ${{ env.DISABLE_PATH }}
shell: pwsh
- name: Build
run: |
& '${{ env.DEVENV }}' SimpleCom.sln /Project ./Installer/Installer.vdproj /Build "Release|x64"
shell: pwsh
- name: 'Upload Release Asset'
uses: AButler/upload-release-assets@v3.0
with:
release-tag: ${{ github.ref_name }}
files: dist/SimpleCom-${{ needs.version-detection.outputs.version-num }}.zip;Installer/SimpleComInstaller-${{ needs.version-detection.outputs.version-num }}.msi
repo-token: ${{ github.token }}
winget-pkg-pr:
needs: [version-detection, build]
runs-on: windows-2022
steps:
- name: Create PR
uses: vedantmgoyal9/winget-releaser@main
with:
identifier: YaSuenag.SimpleCom
installers-regex: '\.msi$'
version: ${{ needs.version-detection.outputs.version-num }}
token: ${{ secrets.WINGET_TOKEN }}