Skip to content

Commit 862cc7a

Browse files
committed
Rename primary branch to main, use node20, update tsconfig
1 parent 04fb6c5 commit 862cc7a

File tree

13 files changed

+148
-75
lines changed

13 files changed

+148
-75
lines changed

.github/actions/generate-action-code/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- uses: actions/setup-node@v3
88
with:
9-
node-version: 16
9+
node-version: 20
1010
check-latest: true
1111
cache: 'npm'
1212
- name: Generate action code

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CodeQL
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
paths-ignore: [ 'dist/*.js' ]
77
pull_request:
88
# The branches below must be a subset of the branches above
9-
branches: [ master ]
9+
branches: [ main ]
1010
schedule:
1111
- cron: '15 11 * * 1'
1212

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Action Code
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
paths-ignore: [ 'dist/*.js' ]
77

88
jobs:

.github/workflows/tag-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
update-tags:
99
name: Update Running Releases
1010
runs-on: ubuntu-latest
11+
if: ${{ github.event.release.prerelease == false }}
1112
steps:
1213
- uses: actions/checkout@v4
13-
- uses: sersoft-gmbh/running-release-tags-action@v2
14-
if: ${{ github.event.release.prerelease == false }}
14+
- uses: sersoft-gmbh/running-release-tags-action@v3
1515
with:
1616
update-full-release: true
1717
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
paths:
77
- 'dist/*.js'
88
- 'action.yml'
99
- '.github/workflows/tests.yml'
1010
pull_request:
11-
branches: [ master ]
11+
branches: [ main ]
1212

1313
jobs:
1414
test-project:
@@ -60,7 +60,7 @@ jobs:
6060
- name: Generate action code
6161
if: ${{ github.event_name == 'pull_request' }}
6262
uses: ./.github/actions/generate-action-code
63-
- uses: sersoft-gmbh/xcodebuild-action@master
63+
- uses: sersoft-gmbh/xcodebuild-action@main
6464
if: ${{ github.event_name == 'push' }}
6565
with:
6666
project: ${{ env.INPUT_PROJECT }}
@@ -130,7 +130,7 @@ jobs:
130130
- name: Generate action code
131131
if: ${{ github.event_name == 'pull_request' }}
132132
uses: ./.github/actions/generate-action-code
133-
- uses: sersoft-gmbh/xcodebuild-action@master
133+
- uses: sersoft-gmbh/xcodebuild-action@main
134134
if: ${{ github.event_name == 'push' }}
135135
with:
136136
workspace: ${{ env.INPUT_WORKSPACE }}
@@ -187,7 +187,7 @@ jobs:
187187
- name: Generate action code
188188
if: ${{ github.event_name == 'pull_request' }}
189189
uses: ./.github/actions/generate-action-code
190-
- uses: sersoft-gmbh/xcodebuild-action@master
190+
- uses: sersoft-gmbh/xcodebuild-action@main
191191
if: ${{ github.event_name == 'push' }}
192192
with:
193193
spm-package: ${{ env.INPUT_SPM_PACKAGE }}
@@ -244,9 +244,9 @@ jobs:
244244
- name: Generate action code
245245
if: ${{ github.event_name == 'pull_request' }}
246246
uses: ./.github/actions/generate-action-code
247-
- uses: sersoft-gmbh/xcodebuild-action@master
247+
- uses: sersoft-gmbh/xcodebuild-action@main
248248
if: ${{ github.event_name == 'push' }}
249-
id: xcodebuild-master
249+
id: xcodebuild-main
250250
with:
251251
project: ${{ env.INPUT_PROJECT }}
252252
target: ${{ env.INPUT_TARGET }}
@@ -319,8 +319,8 @@ jobs:
319319
- id: xcodebuild
320320
env:
321321
EVENT_NAME: ${{ github.event_name }}
322-
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-master.outputs.unprocessed-command }}
323-
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-master.outputs.executed-command }}
322+
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-main.outputs.unprocessed-command }}
323+
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-main.outputs.executed-command }}
324324
LOCAL_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-local.outputs.unprocessed-command }}
325325
LOCAL_EXECUTED_COMMAND: ${{ steps.xcodebuild-local.outputs.executed-command }}
326326
run: |
@@ -415,9 +415,9 @@ jobs:
415415
- name: Generate action code
416416
if: ${{ github.event_name == 'pull_request' }}
417417
uses: ./.github/actions/generate-action-code
418-
- uses: sersoft-gmbh/xcodebuild-action@master
418+
- uses: sersoft-gmbh/xcodebuild-action@main
419419
if: ${{ github.event_name == 'push' }}
420-
id: xcodebuild-master
420+
id: xcodebuild-main
421421
with:
422422
workspace: ${{ env.INPUT_WORKSPACE }}
423423
scheme: ${{ env.INPUT_SCHEME }}
@@ -492,8 +492,8 @@ jobs:
492492
- id: xcodebuild
493493
env:
494494
EVENT_NAME: ${{ github.event_name }}
495-
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-master.outputs.unprocessed-command }}
496-
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-master.outputs.executed-command }}
495+
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-main.outputs.unprocessed-command }}
496+
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-main.outputs.executed-command }}
497497
LOCAL_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-local.outputs.unprocessed-command }}
498498
LOCAL_EXECUTED_COMMAND: ${{ steps.xcodebuild-local.outputs.executed-command }}
499499
run: |
@@ -589,9 +589,9 @@ jobs:
589589
- name: Generate action code
590590
if: ${{ github.event_name == 'pull_request' }}
591591
uses: ./.github/actions/generate-action-code
592-
- uses: sersoft-gmbh/xcodebuild-action@master
592+
- uses: sersoft-gmbh/xcodebuild-action@main
593593
if: ${{ github.event_name == 'push' }}
594-
id: xcodebuild-master
594+
id: xcodebuild-main
595595
with:
596596
spm-package: ${{ env.INPUT_SPM_PACKAGE }}
597597
scheme: ${{ env.INPUT_SCHEME }}
@@ -666,8 +666,8 @@ jobs:
666666
- id: xcodebuild
667667
env:
668668
EVENT_NAME: ${{ github.event_name }}
669-
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-master.outputs.unprocessed-command }}
670-
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-master.outputs.executed-command }}
669+
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-main.outputs.unprocessed-command }}
670+
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-main.outputs.executed-command }}
671671
LOCAL_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-local.outputs.unprocessed-command }}
672672
LOCAL_EXECUTED_COMMAND: ${{ steps.xcodebuild-local.outputs.executed-command }}
673673
run: |
@@ -744,9 +744,9 @@ jobs:
744744
- name: Generate action code
745745
if: ${{ github.event_name == 'pull_request' }}
746746
uses: ./.github/actions/generate-action-code
747-
- uses: sersoft-gmbh/xcodebuild-action@master
747+
- uses: sersoft-gmbh/xcodebuild-action@main
748748
if: ${{ github.event_name == 'push' }}
749-
id: xcodebuild-master
749+
id: xcodebuild-main
750750
with:
751751
project: ${{ env.INPUT_PROJECT }}
752752
scheme: ${{ env.INPUT_SCHEME }}
@@ -761,8 +761,8 @@ jobs:
761761
- id: xcodebuild
762762
env:
763763
EVENT_NAME: ${{ github.event_name }}
764-
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-master.outputs.unprocessed-command }}
765-
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-master.outputs.executed-command }}
764+
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-main.outputs.unprocessed-command }}
765+
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-main.outputs.executed-command }}
766766
LOCAL_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-local.outputs.unprocessed-command }}
767767
LOCAL_EXECUTED_COMMAND: ${{ steps.xcodebuild-local.outputs.executed-command }}
768768
run: |
@@ -804,9 +804,9 @@ jobs:
804804
- name: Generate action code
805805
if: ${{ github.event_name == 'pull_request' }}
806806
uses: ./.github/actions/generate-action-code
807-
- uses: sersoft-gmbh/xcodebuild-action@master
807+
- uses: sersoft-gmbh/xcodebuild-action@main
808808
if: ${{ github.event_name == 'push' }}
809-
id: xcodebuild-master
809+
id: xcodebuild-main
810810
with:
811811
project: ${{ env.INPUT_PROJECT }}
812812
scheme: ${{ env.INPUT_SCHEME }}
@@ -823,8 +823,8 @@ jobs:
823823
- id: xcodebuild
824824
env:
825825
EVENT_NAME: ${{ github.event_name }}
826-
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-master.outputs.unprocessed-command }}
827-
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-master.outputs.executed-command }}
826+
BRANCH_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-main.outputs.unprocessed-command }}
827+
BRANCH_EXECUTED_COMMAND: ${{ steps.xcodebuild-main.outputs.executed-command }}
828828
LOCAL_UNPROCESSED_COMMAND: ${{ steps.xcodebuild-local.outputs.unprocessed-command }}
829829
LOCAL_EXECUTED_COMMAND: ${{ steps.xcodebuild-local.outputs.executed-command }}
830830
run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The command that was executed by this action. This will also be printed to the a
170170

171171
Use the following snippet when you want to run tests configured with the `MyApp` scheme inside a `MyApp` Xcode project:
172172
```yaml
173-
uses: sersoft-gmbh/xcodebuild-action@v2
173+
uses: sersoft-gmbh/xcodebuild-action@v3
174174
with:
175175
project: MyApp.xcodeproj
176176
scheme: MyApp

action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ inputs:
112112
description: The output formatter to use (e.g. xcpretty, xcbeautify, ...). The xcodebuild output will be piped into this formatter.
113113
required: false
114114
default: 'xcpretty --color'
115-
use-xcpretty:
116-
description: Whether the output of xcodebuild should be forwarded to xcpretty.
117-
required: false
118-
default: 'false'
119-
deprecationMessage: 'Use `output-formatter` instead.'
120-
xcpretty-colored-output:
121-
description: Whether xcpretty should use colored output (e.g. `xcpretty --color`).
122-
required: false
123-
default: 'true'
124-
deprecationMessage: 'Use `output-formatter` instead.'
125115
dry-run:
126116
description: '<TEST ONLY> Whether the commands should only be composed and not actually run. Only used in test.'
127117
required: false
@@ -131,7 +121,7 @@ outputs:
131121
executed-command:
132122
description: The command that was executed.
133123
runs:
134-
using: node16
124+
using: node20
135125
main: dist/index.js
136126
branding:
137127
color: blue

dist/index.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ function allArgumentStrings(args, useResolvedValue = true, escapeValue = false)
9090
return args.flatMap(a => argumentStrings(a, useResolvedValue, escapeValue));
9191
}
9292
async function runXcodebuild(args, outputFormatter) {
93-
var _a;
9493
const xcodebuildOut = outputFormatter ? 'pipe' : process.stdout;
9594
const xcodebuild = (0, child_process_1.spawn)('xcodebuild', allArgumentStrings(args), {
9695
stdio: ['inherit', xcodebuildOut, process.stderr],
@@ -110,7 +109,7 @@ async function runXcodebuild(args, outputFormatter) {
110109
const formattedOutput = (0, child_process_1.spawn)(outputFormatter.tool, allArgumentStrings(outputFormatter.args), {
111110
stdio: ['pipe', process.stdout, process.stderr],
112111
});
113-
(_a = xcodebuild.stdout) === null || _a === void 0 ? void 0 : _a.pipe(formattedOutput.stdin);
112+
xcodebuild.stdout?.pipe(formattedOutput.stdin);
114113
finishedPromise = finishedPromise.then((xcodeCode) => new Promise((resolve, reject) => {
115114
formattedOutput.on('error', reject);
116115
formattedOutput.on('exit', (formattedOutputCode, formattedOutputSignal) => {
@@ -129,9 +128,8 @@ async function runXcodebuild(args, outputFormatter) {
129128
}));
130129
}
131130
const exitCode = await finishedPromise;
132-
if (exitCode != 0) {
131+
if (exitCode != 0)
133132
throw new Error(`Xcodebuild action failed (${exitCode})!`);
134-
}
135133
}
136134
async function main() {
137135
let xcodebuildArgs = [];
@@ -152,29 +150,29 @@ async function main() {
152150
}
153151
function _pushArgWithValue(name, value, opts) {
154152
let processedValue = value;
155-
if (opts === null || opts === void 0 ? void 0 : opts.skipEmptyValues) {
153+
if (opts?.skipEmptyValues) {
156154
processedValue = processedValue.trim();
157155
if (processedValue.length <= 0)
158156
return;
159157
}
160-
if (opts === null || opts === void 0 ? void 0 : opts.isPath)
158+
if (opts?.isPath)
161159
processedValue = path.resolve(processedValue);
162160
_pushArg(name, { originalValue: value, resolvedValue: processedValue });
163161
}
164162
function _addInputArg(inputName, argName, opts) {
165-
if (opts === null || opts === void 0 ? void 0 : opts.isList) {
163+
if (opts?.isList) {
166164
let values = core.getMultilineInput(inputName);
167165
if (values)
168-
values.forEach(value => _pushArgWithValue(argName !== null && argName !== void 0 ? argName : inputName, value, {
169-
isPath: opts === null || opts === void 0 ? void 0 : opts.isPath,
166+
values.forEach(value => _pushArgWithValue(argName ?? inputName, value, {
167+
isPath: opts?.isPath,
170168
skipEmptyValues: true,
171169
}));
172170
}
173171
else {
174172
let value = core.getInput(inputName);
175173
if (value)
176-
_pushArgWithValue(argName !== null && argName !== void 0 ? argName : inputName, value, {
177-
isPath: opts === null || opts === void 0 ? void 0 : opts.isPath,
174+
_pushArgWithValue(argName ?? inputName, value, {
175+
isPath: opts?.isPath,
178176
skipEmptyValues: false,
179177
});
180178
}
@@ -190,12 +188,12 @@ async function main() {
190188
}
191189
function addBoolArg(inputName, argName) {
192190
const value = core.getInput(inputName);
193-
if (value === null || value === void 0 ? void 0 : value.length)
194-
_pushArgWithValue(argName !== null && argName !== void 0 ? argName : inputName, core.getBooleanInput(inputName) ? 'YES' : 'NO');
191+
if (value?.length)
192+
_pushArgWithValue(argName ?? inputName, core.getBooleanInput(inputName) ? 'YES' : 'NO');
195193
}
196194
function addFlagArg(inputName, argName) {
197195
if (core.getInput(inputName).length && core.getBooleanInput(inputName))
198-
_pushArg(argName !== null && argName !== void 0 ? argName : inputName);
196+
_pushArg(argName ?? inputName);
199197
}
200198
if (workspace) {
201199
_pushArgWithValue('workspace', workspace, { isPath: true });

dist/license.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
@actions/core
2+
MIT
3+
The MIT License (MIT)
4+
5+
Copyright 2019 GitHub
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
9+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12+
13+
@actions/http-client
14+
MIT
15+
Actions Http Client for Node.js
16+
17+
Copyright (c) GitHub, Inc.
18+
19+
All rights reserved.
20+
21+
MIT License
22+
23+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
24+
associated documentation files (the "Software"), to deal in the Software without restriction,
25+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
26+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
27+
subject to the following conditions:
28+
29+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
30+
31+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
32+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
33+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
34+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
35+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36+
37+
38+
tunnel
39+
MIT
40+
The MIT License (MIT)
41+
42+
Copyright (c) 2012 Koichi Kobayashi
43+
44+
Permission is hereby granted, free of charge, to any person obtaining a copy
45+
of this software and associated documentation files (the "Software"), to deal
46+
in the Software without restriction, including without limitation the rights
47+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48+
copies of the Software, and to permit persons to whom the Software is
49+
furnished to do so, subject to the following conditions:
50+
51+
The above copyright notice and this permission notice shall be included in
52+
all copies or substantial portions of the Software.
53+
54+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60+
THE SOFTWARE.
61+
62+
63+
uuid
64+
MIT
65+
The MIT License (MIT)
66+
67+
Copyright (c) 2010-2020 Robert Kieffer and other contributors
68+
69+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
70+
71+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
72+
73+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)