Skip to content

Commit c644426

Browse files
Merge pull request #1 from intuit/gitActions
git actions
2 parents 8e4f3b5 + 7481845 commit c644426

File tree

13 files changed

+214
-11
lines changed

13 files changed

+214
-11
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# List of source code paths and code owners
2-
# For more information on the CODEOWNERS file go to:
3-
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
4-
5-
# Uncomment line 10 and add the correct owners's usernames.
6-
# These owners will be the default owners for everything in
7-
# the repo. Unless a later match takes precedence,
8-
# @global-owner1 and @global-owner2 will be requested for
9-
# review when someone opens a pull request.
10-
* @global-owner1 @global-owner2
1+
# MAINTAINERS:
2+
# Raghav Agarwal (@raghav-agarwal)
3+
# Aditi Aggarwal (@aditi2205)
4+
# Sonam Shenoy (@sonamkshenoy)

.github/SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
6+
| Version | Supported |
7+
| ------- | ------------------ |
8+
| 11 | JAVA |
9+
10+
## Reporting a Vulnerability
11+
12+
To report a vulnerability, please raise an issue on this repo under the issues tab.

.github/badges/branches.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"color": "#97ca00", "label": "branches", "message": "95.4%", "schemaVersion": 1}

.github/badges/branches.svg

Lines changed: 1 addition & 0 deletions
Loading

.github/badges/jacoco.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"color": "#97ca00", "label": "coverage", "message": "99.2%", "schemaVersion": 1}

.github/badges/jacoco.svg

Lines changed: 1 addition & 0 deletions
Loading

.github/labeler.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Documentation:
2+
- any: ['**/*.txt', '**/*.md, docs/**']
3+
4+
Actions:
5+
- '.github/workflows/*'
6+
7+
Tests:
8+
- all: ['src/test/**', '**/*.java']
9+
10+
Code:
11+
- all: ['src/main/**', '**/*.java']

.github/workflows/maven-build.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "master" ]
14+
pull_request:
15+
branches: [ "master" ]
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up JDK 11 for x64
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '11'
26+
distribution: 'adopt'
27+
architecture: x64
28+
cache: maven
29+
- name: Build with Maven
30+
run: mvn -B package --file pom.xml
31+
32+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
33+
- name: Update dependency graph
34+
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
35+
36+
- name: Generate JaCoCo Badge
37+
id: jacoco
38+
uses: cicirello/jacoco-badge-generator@v2
39+
with:
40+
generate-coverage-badge: true
41+
generate-coverage-endpoint: true
42+
generate-branches-endpoint: true
43+
generate-branches-badge: true
44+
45+
- name: Log coverage percentage
46+
run: |
47+
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
48+
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
49+
50+
- name: Commit the badge (if it changed)
51+
run: |
52+
if [[ `git status --porcelain` ]]; then
53+
git config --global user.name 'Raghav Agarwal'
54+
git config --global user.email '[email protected]'
55+
git add -A
56+
git commit -m "Autogenerated JaCoCo coverage badge"
57+
git push
58+
fi
59+
60+
- name: Upload JaCoCo coverage report
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: jacoco-report
64+
path: target/site/jacoco/

.github/workflows/pr-labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: Labeler
9+
on: [pull_request]
10+
11+
jobs:
12+
label:
13+
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- uses: actions/labeler@v4
21+
with:
22+
repo-token: "${{ secrets.RWPULSE_ACCESS_TOKEN }}"
23+
sync-labels: true
24+
dot: true

.github/workflows/publish-central.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish package to the Maven Central Repository
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
release:
9+
name: Release on Sonatype OSS
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v2
17+
with:
18+
java-version: 11
19+
distribution: 'adopt'
20+
21+
- name: Build with Maven
22+
run: mvn -B package --file pom.xml
23+
24+
- name: Set up Apache Maven Central
25+
uses: actions/setup-java@v2
26+
with: # running setup-java again overwrites the settings.xml
27+
java-version: 11
28+
distribution: 'adopt'
29+
server-id: ossrh
30+
server-username: OSSRH_USERNAME
31+
server-password: OSSRH_PASSWORD
32+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
33+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
34+
35+
- name: Publish to Apache Maven Central
36+
run: mvn -Prelease deploy
37+
env:
38+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
39+
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
40+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)