1616 DEVELOPER_DIR : /Applications/Xcode_26.0.1.app
1717 RELEASE_BRANCH : release/${{ inputs.version }}
1818
19+ # Common reusable configurations
20+ x-checkout-step : &checkout-step
21+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+ with :
23+ persist-credentials : false
24+
25+ x-checkout-release-branch : &checkout-release-branch
26+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+ with :
28+ ref : ${{ env.RELEASE_BRANCH }}
29+ persist-credentials : false
30+
31+ x-upload-artifact : &upload-artifact
32+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
33+
1934jobs :
2035 setup-credentials :
2136 name : Setup Actor Credentials
6984 contents : read
7085 steps :
7186 - name : Checkout repository
72- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
73- with :
74- persist-credentials : false
87+ << : *checkout-step
7588 - name : Set up Ruby and Bundler
7689 uses : ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
7790 with :
@@ -103,16 +116,13 @@ jobs:
103116 permissions :
104117 contents : read
105118 steps :
106- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
107- with :
108- ref : ${{ env.RELEASE_BRANCH }}
109- persist-credentials : false
119+ - << : *checkout-release-branch
110120 - name : Install dependencies
111121 run : sudo apt-get install -y libcurl4-openssl-dev libxml2-dev
112122 - name : Build binary
113123 run : make --debug spm_linux_build
114124 - name : Upload binary
115- uses : actions/ upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
125+ << : * upload-artifact
116126 with :
117127 name : ${{ matrix.artifact_name }}
118128 path : .build/release/swiftlint
@@ -138,10 +148,7 @@ jobs:
138148 env :
139149 BINARY_PATH : .build/${{ matrix.swift_sdk }}/release/swiftlint
140150 steps :
141- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
142- with :
143- ref : ${{ env.RELEASE_BRANCH }}
144- persist-credentials : false
151+ - << : *checkout-release-branch
145152 - name : Install SDK
146153 run : swift sdk install https://download.swift.org/swift-6.2-release/static-sdk/swift-6.2-RELEASE/swift-6.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum d2225840e592389ca517bbf71652f7003dbf45ac35d1e57d98b9250368769378
147154 - name : Build static binary
@@ -155,7 +162,7 @@ jobs:
155162 - name : Strip binary
156163 run : strip -s "$BINARY_PATH"
157164 - name : Upload artifact
158- uses : actions/ upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
165+ << : * upload-artifact
159166 with :
160167 name : ${{ matrix.artifact_name }}
161168 path : ${{ env.BINARY_PATH }}
@@ -167,14 +174,11 @@ jobs:
167174 permissions :
168175 contents : read
169176 steps :
170- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
171- with :
172- ref : ${{ env.RELEASE_BRANCH }}
173- persist-credentials : false
177+ - << : *checkout-release-branch
174178 - name : Build SwiftLint for macOS
175179 run : make --debug bazel_release
176180 - name : Upload build artifacts
177- uses : actions/ upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
181+ << : * upload-artifact
178182 with :
179183 name : swiftlint-macos
180184 path : |
0 commit comments