Skip to content

Commit bac8e69

Browse files
committed
ci: workflow updates
1 parent 9cbc9de commit bac8e69

2 files changed

Lines changed: 15 additions & 147 deletions

File tree

.github/workflows/commit.yml

Lines changed: 10 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,19 @@
11
name: Commit
22

3-
on: push
4-
5-
env:
6-
api_level: 29
7-
commitlint_version: '17'
8-
conventional_changelog_version: '5'
9-
java_version: 11
10-
ktlint_version: '0.46.1'
11-
node_version: 18
12-
semantic_release_version: '20'
3+
on: [ push, workflow_dispatch ]
134

145
jobs:
15-
commit_lint:
16-
name: Commit Lint
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v3.3.0
21-
with:
22-
fetch-depth: 0
23-
- name: Run Commit Lint
24-
id: commitlint
25-
uses: ./.github/actions/commit-lint
26-
with:
27-
node_version: ${{ env.node_version }}
28-
commitlint_version: ${{ env.commitlint_version }}
29-
30-
code_lint:
31-
name: Code Lint
32-
runs-on: ubuntu-latest
33-
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v3.3.0
36-
- name: Run ktlint
37-
id: ktlint
38-
uses: ./.github/actions/code-lint
39-
with:
40-
ktlint_version: ${{ env.ktlint_version }}
41-
42-
validation:
43-
name: "Validation"
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v4
47-
- uses: gradle/actions/wrapper-validation@v3
48-
49-
determine_version:
50-
name: Version Determination
51-
runs-on: ubuntu-latest
52-
outputs:
53-
releaseType: ${{ steps.determine_version.outputs.releaseType }}
54-
releaseChannel: ${{ steps.determine_version.outputs.releaseChannel }}
55-
buildVersion: ${{ steps.determine_version.outputs.buildVersion }}
56-
steps:
57-
- name: Checkout
58-
uses: actions/checkout@v3.3.0
59-
- name: Determine Version
60-
id: determine_version
61-
uses: ./.github/actions/determine-version
62-
with:
63-
node_version: ${{ env.node_version }}
64-
semantic_release_version: ${{ env.semantic_release_version }}
65-
conventional_changelog_version: ${{ env.conventional_changelog_version }}
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
69-
build:
70-
name: Build
71-
needs: [ commit_lint, code_lint, validation ]
72-
runs-on: ubuntu-latest
73-
steps:
74-
- name: Checkout
75-
uses: actions/checkout@v3.3.0
76-
- name: Build
77-
id: build
78-
uses: ./.github/actions/build
79-
with:
80-
java_version: ${{ env.java_version }}
81-
env:
82-
BUILD_VERSION: "${{ needs.determine_version.outputs.buildVersion }}"
83-
84-
unit_tests:
85-
name: Unit Tests
86-
needs: [ commit_lint, code_lint, validation ]
87-
runs-on: ubuntu-latest
88-
steps:
89-
- name: Checkout
90-
uses: actions/checkout@v3.3.0
91-
- name: Unit Tests
92-
id: unit_tests
93-
uses: ./.github/actions/unit-tests
94-
with:
95-
java_version: ${{ env.java_version }}
96-
97-
instrumentation_tests:
98-
name: Instrumentation Tests
99-
needs: [ commit_lint, code_lint ]
100-
runs-on: macos-11
101-
steps:
102-
- name: Checkout
103-
uses: actions/checkout@v3.3.0
104-
- name: Run Tests
105-
id: instrumentation_tests
106-
uses: ./.github/actions/instrumentation-test
107-
with:
108-
java_version: ${{ env.java_version }}
109-
api_level: ${{ env.api_level }}
110-
111-
release:
112-
name: Release
113-
runs-on: ubuntu-latest
114-
needs: [ determine_version, build, unit_tests, instrumentation_tests ]
115-
if: needs.determine_version.outputs.releaseType != ''
116-
env:
117-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118-
outputs:
119-
releaseType: ${{ steps.release.outputs.releaseType }}
120-
releaseChannel: ${{ steps.release.outputs.releaseChannel }}
121-
buildVersion: ${{ steps.release.outputs.buildVersion }}
122-
steps:
123-
- name: Checkout
124-
uses: actions/checkout@v3.3.0
125-
- name: Release
126-
id: release
127-
uses: ./.github/actions/release
128-
with:
129-
node_version: ${{ env.node_version }}
130-
semantic_release_version: ${{ env.semantic_release_version }}
131-
conventional_changelog_version: ${{ env.conventional_changelog_version }}
132-
133-
publish:
134-
name: Publication
135-
runs-on: ubuntu-latest
136-
needs: release
137-
if: needs.release.outputs.releaseType != ''
138-
env:
139-
RELEASE_TYPE: ${{ needs.release.outputs.releaseType }}
140-
RELEASE_CHANNEL: ${{ needs.release.outputs.releaseChannel }}
141-
BUILD_VERSION: ${{ needs.release.outputs.buildVersion }}
142-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6+
semantic_library_workflow:
7+
name: push
8+
uses: krogerco/Shared-CI-Workflow-Android/.github/workflows/semantic_library_workflow.yml@v1.5.0
9+
with:
10+
java_version: '24'
11+
ktlint_version: '-1'
12+
test_command: 'test'
13+
secrets:
14314
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
14415
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
14516
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
14617
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyId }}
14718
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
148-
steps:
149-
- name: Checkout
150-
uses: actions/checkout@v3.3.0
151-
- name: Publish
152-
id: publish
153-
uses: ./.github/actions/publish
154-
with:
155-
java_version: ${{ env.java_version }}
19+
REPO_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull_request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
name: Check PR Title
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: thehanimo/pr-title-checker@v1.3.4
13+
- uses: thehanimo/pr-title-checker@v1.4.0
1414
with:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
github_configuration_owner: 'krogerco'
17+
github_configuration_repo: 'Shared-CI-Workflow-Android'
18+
github_configuration_path: '.github/config/pr-title-checker-config.json'
19+
github_configuration_ref: 'v1.0.0'

0 commit comments

Comments
 (0)