Skip to content

Commit 3fcb5aa

Browse files
authored
use pipelines for ci & update checkout action to v3 (#25)
2 parents eea4539 + 2b025c5 commit 3fcb5aa

File tree

6 files changed

+57
-22
lines changed

6 files changed

+57
-22
lines changed

.github/workflows/CI-deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI - Deploy
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
workflow_dispatch:
7+
jobs:
8+
swiftlint:
9+
name: SwiftLint
10+
uses: ./.github/workflows/swiftlint.yml
11+
secrets: inherit
12+
test:
13+
name: Build CodeEdit CLI
14+
needs: swiftlint
15+
uses: ./.github/workflows/build.yml
16+
secrets: inherit
17+
deploy:
18+
name: Deploy CodeEdit CLI
19+
needs: [swiftlint, test]
20+
uses: ./.github/workflows/deploy.yml
21+
secrets: inherit

.github/workflows/CI-pull-request.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI - Pull Request
2+
on:
3+
pull_request:
4+
branches:
5+
- 'main'
6+
workflow_dispatch:
7+
jobs:
8+
swiftlint:
9+
name: SwiftLint
10+
uses: ./.github/workflows/swiftlint.yml
11+
secrets: inherit
12+
test:
13+
name: Build CodeEdit CLI
14+
needs: swiftlint
15+
uses: ./.github/workflows/build.yml
16+
secrets: inherit

.github/workflows/CI-push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI - Push to main
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
workflow_dispatch:
7+
jobs:
8+
swiftlint:
9+
name: SwiftLint
10+
uses: ./.github/workflows/swiftlint.yml
11+
secrets: inherit
12+
test:
13+
name: Build CodeEdit CLI
14+
needs: swiftlint
15+
uses: ./.github/workflows/build.yml
16+
secrets: inherit

.github/workflows/build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,13 @@ name: Build
22
on:
33
workflow_dispatch:
44
workflow_call:
5-
push:
6-
branches:
7-
- main
8-
pull_request:
9-
branches:
10-
- main
11-
125
jobs:
136
build-codeedit-cli:
147
name: Building CodeEdit CLI
158
runs-on: [self-hosted, macOS]
169
steps:
1710
- name: Checkout Repository
18-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1912

2013
- name: Building
2114
run: swift build -c release --arch arm64 --arch x86_64

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@ name: Deploy
22
on:
33
workflow_dispatch:
44
workflow_call:
5-
push:
6-
tags:
7-
- '*.*.*'
85

96
jobs:
107
deploy-codeedit-cli:
118
name: Deploying CodeEdit CLI
129
runs-on: [self-hosted, macOS]
1310
steps:
1411
- name: Checkout Repository
15-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1613

1714
- name: Install codesign certificate
1815
env:

.github/workflows/swiftlint.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
name: SwiftLint
22
on:
3+
workflow_dispatch:
34
workflow_call:
4-
push:
5-
branches:
6-
- 'main'
7-
pull_request:
8-
branches:
9-
- 'main'
105
jobs:
116
SwiftLint:
127
runs-on: [self-hosted, macOS]
138
steps:
14-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v3
1510
- name: GitHub Action for SwiftLint with --strict
1611
run: swiftlint --strict
17-
# uses: norio-nomura/action-swiftlint@3.2.1
18-
# with:
19-
# args: --strict

0 commit comments

Comments
 (0)