-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.4 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (42 loc) · 1.4 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
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Validate tag matches plugin.json version
if: startsWith(github.ref, 'refs/tags/v')
shell: pwsh
run: |
$plugin = Get-Content "Flow.Launcher.Plugin.MultiprofileBookmarks/plugin.json" | ConvertFrom-Json
$expectedTag = "v$($plugin.Version)"
$actualTag = "${{ github.ref_name }}"
if ($actualTag -ne $expectedTag) {
Write-Error "Tag '$actualTag' does not match plugin version '$($plugin.Version)' (expected '$expectedTag')."
}
- name: Build release package
shell: pwsh
run: ./release.ps1
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: MultiprofileBookmarks
path: Flow.Launcher.Plugin.MultiprofileBookmarks/bin/MultiprofileBookmarks.zip
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: Flow.Launcher.Plugin.MultiprofileBookmarks/bin/MultiprofileBookmarks.zip