@@ -2,6 +2,10 @@ name: SwiftFormat
2
2
3
3
on :
4
4
workflow_dispatch :
5
+ inputs :
6
+ tag :
7
+ description : ' SwiftFormat tag'
8
+ required : true
5
9
6
10
jobs :
7
11
windows :
@@ -10,21 +14,28 @@ jobs:
10
14
strategy :
11
15
matrix :
12
16
include :
13
- - tag : 0.51.10
14
- branch : master
17
+ - swift_tag : DEVELOPMENT-SNAPSHOT-2023-05-22-a
18
+ swift_branch : development
15
19
16
20
steps :
21
+ - name : extract swift version
22
+ run : |
23
+ set SWIFT_VER=${{ matrix.swift_branch }}
24
+ set SWIFT_VER=%SWIFT_VER:swift-=%
25
+ set SWIFT_VER=%SWIFT_VER:-release=%
26
+ echo %SWIFT_VER%
27
+
17
28
# Build
18
29
- uses : actions/checkout@v3
19
30
with :
20
31
fetch-depth : 1
21
- ref : refs/tags/${{ matrix .tag }}
32
+ ref : refs/tags/${{ github.event.inputs .tag }}
22
33
repository : nicklockwood/SwiftFormat
23
34
24
35
- uses : compnerd/gha-setup-swift@main
25
36
with :
26
- branch : development
27
- tag : DEVELOPMENT-SNAPSHOT-2023-05-22-a
37
+ branch : ${{ matrix.swift_branch }}
38
+ tag : ${{ matrix.swift_tag }}
28
39
29
40
- name : test
30
41
run : |
46
57
47
58
- name : package
48
59
run : |
49
- msbuild -restore ${{ github.workspace }}\SourceCache\${{ vars.GITHUB_REPOSITORY }}\installer-scripts\SwiftFormat.wixproj -nologo -p:Configuration=Release -p:ProductVersion=${{ matrix .tag }} -p:SWIFTFORMAT_BUILD=${{ github.workspace }}\.build\release -p:OutputPath=${{ github.workspace }}\artifacts -p:RunWixToolsOutOfProc=true
60
+ msbuild -restore ${{ github.workspace }}\SourceCache\${{ vars.GITHUB_REPOSITORY }}\installer-scripts\SwiftFormat.wixproj -nologo -p:Configuration=Release -p:ProductVersion=${{ github.event.inputs .tag }} -p:SWIFTFORMAT_BUILD=${{ github.workspace }}\.build\release -p:OutputPath=${{ github.workspace }}\artifacts -p:RunWixToolsOutOfProc=true
50
61
51
62
# Release
52
63
- uses : actions/create-release@v1
56
67
with :
57
68
draft : true
58
69
prerelease : true
59
- release_name : SwiftFormat-${{ matrix. tag }}
60
- tag_name : SwiftFormat-${{ matrix. tag }}
70
+ release_name : SwiftFormat-${{ github.event.inputs. tag }} (Swift ${{ matrix.swift_branch }})
71
+ tag_name : SwiftFormat-${{ github.event.inputs. tag }}-${{ matrix.swift_tag }}
61
72
62
73
env :
63
74
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments