Skip to content

Commit dc52dcb

Browse files
hjyamauchicompnerd
authored andcommitted
Add the swift compiler version to the release name in SwiftFormat.yaml.
1 parent b402aae commit dc52dcb

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/SwiftFormat.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: SwiftFormat
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'SwiftFormat tag'
8+
required: true
59

610
jobs:
711
windows:
@@ -10,21 +14,28 @@ jobs:
1014
strategy:
1115
matrix:
1216
include:
13-
- tag: 0.51.10
14-
branch: master
17+
- swift_tag: DEVELOPMENT-SNAPSHOT-2023-05-22-a
18+
swift_branch: development
1519

1620
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+
1728
# Build
1829
- uses: actions/checkout@v3
1930
with:
2031
fetch-depth: 1
21-
ref: refs/tags/${{ matrix.tag }}
32+
ref: refs/tags/${{ github.event.inputs.tag }}
2233
repository: nicklockwood/SwiftFormat
2334

2435
- uses: compnerd/gha-setup-swift@main
2536
with:
26-
branch: development
27-
tag: DEVELOPMENT-SNAPSHOT-2023-05-22-a
37+
branch: ${{ matrix.swift_branch }}
38+
tag: ${{ matrix.swift_tag }}
2839

2940
- name: test
3041
run: |
@@ -46,7 +57,7 @@ jobs:
4657

4758
- name: package
4859
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
5061
5162
# Release
5263
- uses: actions/create-release@v1
@@ -56,8 +67,8 @@ jobs:
5667
with:
5768
draft: true
5869
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 }}
6172
- uses: actions/[email protected]
6273
env:
6374
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)