Skip to content

Commit be38640

Browse files
authored
feat: base of GitHub workflows (#5)
1 parent 4a68644 commit be38640

78 files changed

Lines changed: 735 additions & 426 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ indent_style = tab
1111
indent_size = 2
1212
trim_trailing_whitespace = true
1313
insert_final_newline = true
14+
15+
[*.{kt,kts}]
16+
ktlint_code_style = ktlint_official
17+
ktlint_standard_keyword-spacing = disabled
18+
ktlint_standard_annotation = disabled

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
on: [pull_request, workflow_dispatch]
3+
4+
concurrency:
5+
group: build-${{ github.event.number }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: gradle

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
on: [pull_request, workflow_dispatch]
3+
4+
concurrency:
5+
group: lint-${{ github.event.number }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: gradle

.github/workflows/lintAndUnit.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
on:
3+
workflow_dispatch: {}
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
uses: paypal/paypal-messages-android/.github/workflows/lint.yml@release
11+
12+
test:
13+
uses: paypal/paypal-messages-android/.github/workflows/test.yml@release
14+
15+
build:
16+
uses: paypal/paypal-messages-android/.github/workflows/build.yml@release
17+
18+
release:
19+
name: Release
20+
needs: [linting, tests, build]
21+
runs-on: ubuntu-latest
22+
23+
permissions:
24+
contents: write
25+
issues: write
26+
pull-requests: write
27+
28+
steps:
29+
- name: Checkout repo
30+
uses: actions/checkout@v3
31+
with:
32+
# pulls all commits (needed for semantic release to correctly version)
33+
fetch-depth: '0'
34+
persist-credentials: false
35+
36+
- name: Set up JDK 17
37+
uses: actions/setup-java@v3
38+
with:
39+
java-version: '17'
40+
distribution: 'temurin'
41+
cache: gradle
42+
43+
- name: Install Dependencies
44+
run: |
45+
npm i -g @semantic-release/exec @semantic-release/changelog @semantic-release/git [email protected]
46+
47+
- name: GitHub Release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: npx semantic-release@21
51+
52+
- name: Publish to Maven
53+
run: echo "Publish to Maven"

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
on: [pull_request, workflow_dispatch]
3+
4+
concurrency:
5+
group: test-${{ github.event.number }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: gradle
23+
24+
- name: Install Dependencies
25+
run: echo "Install Dependencies"
26+
27+
- name: Run Tests
28+
run: echo "Run Tests"

.idea/codeStyles/Project.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)