Skip to content

Commit 52276a5

Browse files
feat: onboaring setup-xcode action
1 parent 277f498 commit 52276a5

28 files changed

Lines changed: 37486 additions & 1 deletion

.eslintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es6": true,
5+
"jest/globals": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:jest/recommended",
12+
"prettier"
13+
],
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"project": "./tsconfig.eslint.json",
17+
"ecmaVersion": 2018,
18+
"sourceType": "module"
19+
},
20+
"plugins": ["@typescript-eslint", "jest"],
21+
"ignorePatterns": ["node_modules/"]
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release GitHub Actions
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Tag for the release"
8+
required: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
release:
15+
permissions:
16+
actions: read
17+
id-token: write
18+
contents: write
19+
20+
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1
21+
with:
22+
tag: "${{ github.event.inputs.tag }}"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: NPM Audit Fix Run
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
force:
7+
description: "Use --force flag for npm audit fix?"
8+
required: true
9+
type: boolean
10+
base_branch:
11+
description: "Specify a base branch"
12+
required: false
13+
default: "main"
14+
schedule:
15+
- cron: "0 0 * * 1"
16+
17+
jobs:
18+
audit-fix:
19+
uses: step-security/reusable-workflows/.github/workflows/audit_fix.yml@v1
20+
with:
21+
force: ${{ inputs.force || false }}
22+
base_branch: ${{ inputs.base_branch || 'main' }}
23+
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
packages: read
28+
issues: write
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Auto Cherry-Pick from Upstream
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
base_branch:
7+
description: "Base branch to create the PR against"
8+
required: true
9+
default: "main"
10+
mode:
11+
description: "Run mode: cherry-pick or verify"
12+
required: false
13+
default: "cherry-pick"
14+
15+
pull_request:
16+
types: [opened, synchronize, labeled]
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
packages: read
22+
issues: write
23+
24+
jobs:
25+
cherry-pick:
26+
if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required')
27+
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1
28+
with:
29+
original-owner: "maxim-lobanov"
30+
repo-name: "setup-xcode"
31+
base_branch: ${{ inputs.base_branch }}
32+
mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode }}

.github/workflows/e2e.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Validate 'setup-xcode'
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
versions-macOS-12:
10+
name: macOS 12
11+
runs-on: macos-12
12+
strategy:
13+
matrix:
14+
xcode-version: ['13.2.1', '13.4', '14.0.1', '14', '14.2', latest, latest-stable]
15+
fail-fast: false
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- uses: ./
21+
name: Setup Xcode
22+
id: setup-xcode
23+
with:
24+
xcode-version: ${{ matrix.xcode-version }}
25+
- name: Print output variables
26+
run: |
27+
echo "Version: ${{ steps.setup-xcode.outputs.version }}"
28+
echo "Path: ${{ steps.setup-xcode.outputs.path }}"
29+
30+
versions-macOS-13:
31+
name: macOS 13
32+
runs-on: macos-13
33+
strategy:
34+
matrix:
35+
xcode-version: ['14', '14.2', '14.3.1', latest, latest-stable]
36+
fail-fast: false
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v6
40+
41+
- uses: ./
42+
name: Setup Xcode
43+
id: setup-xcode
44+
with:
45+
xcode-version: ${{ matrix.xcode-version }}
46+
- name: Print output variables
47+
run: |
48+
echo "Version: ${{ steps.setup-xcode.outputs.version }}"
49+
echo "Path: ${{ steps.setup-xcode.outputs.path }}"
50+
51+
versions-macOS-14:
52+
name: macOS 14
53+
runs-on: macos-14
54+
strategy:
55+
matrix:
56+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#xcode
57+
xcode-version: ['14.3.1', '15.2', '15.3', latest, latest-stable]
58+
fail-fast: false
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v6
62+
63+
- uses: ./
64+
name: Setup Xcode
65+
id: setup-xcode
66+
with:
67+
xcode-version: ${{ matrix.xcode-version }}
68+
- name: Print output variables
69+
run: |
70+
echo "Version: ${{ steps.setup-xcode.outputs.version }}"
71+
echo "Path: ${{ steps.setup-xcode.outputs.path }}"

.github/workflows/guarddog.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Run GuardDog Scan on PRs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
call-guarddog-scan:
14+
uses: step-security/reusable-workflows/.github/workflows/guarddog.yml@v1

.github/workflows/workflow.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build task
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
Build:
10+
runs-on: macos-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v6
14+
15+
- name: Set Node.JS
16+
uses: actions/setup-node@v6
17+
with:
18+
node-version: 20.x
19+
20+
- name: npm install
21+
run: npm install
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Run tests
27+
run: npm run test
28+
29+
- name: Run Prettier
30+
run: npm run format-check
31+
32+
- name: Lint
33+
run: npm run lint

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
lib

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 4,
4+
"arrowParens": "avoid"
5+
}

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Maxim Lobanov and contributors
4+
Copyright (c) 2026 StepSecurity
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

0 commit comments

Comments
 (0)