Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/get-prerelease/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Return a boolean indicating if the version contains prerelease identifiers

inputs:
version:
required: true

outputs:
prerelease:
value: ${{ steps.get_prerelease.outputs.PRERELEASE }}

runs:
using: composite

steps:
- id: get_prerelease
shell: bash
run: |
if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
fi
env:
VERSION: ${{ inputs.version }}
37 changes: 37 additions & 0 deletions .github/actions/get-release-notes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Return the release notes extracted from the body of the PR associated with the release.

inputs:
version:
required: true
repo_name:
required: false
repo_owner:
required: true
token:
required: true

outputs:
release-notes:
value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}

runs:
using: composite

steps:
- uses: actions/github-script@v7
id: get_release_notes
with:
result-encoding: string
script: |
const { data: pulls } = await github.rest.pulls.list({
owner: process.env.REPO_OWNER,
repo: process.env.REPO_NAME,
state: 'all',
head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
});
core.setOutput('RELEASE_NOTES', pulls[0].body);
env:
GITHUB_TOKEN: ${{ inputs.token }}
REPO_OWNER: ${{ inputs.repo_owner }}
REPO_NAME: ${{ inputs.repo_name }}
VERSION: ${{ inputs.version }}
15 changes: 15 additions & 0 deletions .github/actions/get-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Return the version extracted from the branch name

outputs:
version:
value: ${{ steps.get_version.outputs.VERSION }}

runs:
using: composite

steps:
- id: get_version
shell: bash
run: |
VERSION=$(head -1 .version)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
39 changes: 39 additions & 0 deletions .github/actions/maven-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish release to Java

inputs:
java-version:
required: true
ossr-username:
required: true
ossr-token:
required: true
signing-key:
required: true
signing-password:
required: true

runs:
using: composite

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Java
shell: bash
run: |
curl -s "https://get.sdkman.io" | bash
source "/home/runner/.sdkman/bin/sdkman-init.sh"
sdk list java
sdk install java ${{ inputs.java-version }} && sdk default java ${{ inputs.java-version }}

- uses: gradle/actions/wrapper-validation@v5

- name: Publish Packages to Maven
shell: bash
run: ./gradlew publishToSonatype closeSonatypeStagingRepository -PisSnapshot=false --stacktrace
env:
MAVEN_USERNAME: ${{ inputs.ossr-username }}
MAVEN_PASSWORD: ${{ inputs.ossr-token }}
SIGNING_KEY: ${{ inputs.signing-key }}
SIGNING_PASSWORD: ${{ inputs.signing-password }}
41 changes: 41 additions & 0 deletions .github/actions/release-create/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create a GitHub release

inputs:
token:
required: true
files:
required: false
name:
required: true
body:
required: true
tag:
required: true
commit:
required: true
draft:
default: false
required: false
prerelease:
default: false
required: false
fail_on_unmatched_files:
default: true
required: false

runs:
using: composite

steps:
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
body: ${{ inputs.body }}
name: ${{ inputs.name }}
tag_name: ${{ inputs.tag }}
target_commitish: ${{ inputs.commit }}
draft: ${{ inputs.draft }}
prerelease: ${{ inputs.prerelease }}
fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }}
files: ${{ inputs.files }}
env:
GITHUB_TOKEN: ${{ inputs.token }}
71 changes: 71 additions & 0 deletions .github/actions/rl-scanner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "Reversing Labs Scanner"
description: "Runs the Reversing Labs scanner on a specified artifact."
inputs:
artifact-path:
description: "Path to the artifact to be scanned."
required: true
version:
description: "Version of the artifact."
required: true

runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Python dependencies
shell: bash
run: |
pip install boto3 requests

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ env.PRODSEC_TOOLS_ARN }}
aws-region: us-east-1
mask-aws-account-id: true

- name: Install RL Wrapper
shell: bash
run: |
pip install rl-wrapper>=1.0.0 --index-url "https://${{ env.PRODSEC_TOOLS_USER }}:${{ env.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple"

- name: Run RL Scanner
shell: bash
env:
RLSECURE_LICENSE: ${{ env.RLSECURE_LICENSE }}
RLSECURE_SITE_KEY: ${{ env.RLSECURE_SITE_KEY }}
SIGNAL_HANDLER_TOKEN: ${{ env.SIGNAL_HANDLER_TOKEN }}
PYTHONUNBUFFERED: 1
run: |
if [ ! -f "${{ inputs.artifact-path }}" ]; then
echo "Artifact not found: ${{ inputs.artifact-path }}"
exit 1
fi

rl-wrapper \
--artifact "${{ inputs.artifact-path }}" \
--name "${{ github.event.repository.name }}" \
--version "${{ inputs.version }}" \
--repository "${{ github.repository }}" \
--commit "${{ github.sha }}" \
--build-env "github_actions" \
--suppress_output

# Check the outcome of the scanner
if [ $? -ne 0 ]; then
echo "RL Scanner failed."
echo "scan-status=failed" >> $GITHUB_ENV
exit 1
else
echo "RL Scanner passed."
echo "scan-status=success" >> $GITHUB_ENV
fi

outputs:
scan-status:
description: "The outcome of the scan process."
value: ${{ env.scan-status }}
30 changes: 30 additions & 0 deletions .github/actions/tag-exists/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Return a boolean indicating if a tag already exists for the repository

inputs:
token:
required: true
tag:
required: true

outputs:
exists:
description: "Whether the tag exists or not"
value: ${{ steps.tag-exists.outputs.EXISTS }}

runs:
using: composite

steps:
- id: tag-exists
shell: bash
run: |
GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}"
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}")
if [ "$http_status_code" -ne "404" ] ; then
echo "EXISTS=true" >> $GITHUB_OUTPUT
else
echo "EXISTS=false" >> $GITHUB_OUTPUT
fi
env:
TAG_NAME: ${{ inputs.tag }}
GITHUB_TOKEN: ${{ inputs.token }}
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
14 changes: 9 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,25 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17

- name: Set up Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0

- name: Test and Assemble with Gradle
run: ./gradlew assemble check --continue --console=plain

- uses: actions/upload-artifact@v4
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
flags: unittests

- uses: actions/upload-artifact@v5
with:
name: Reports
path: |
packages/auth0-api-java/build/reports/
packages/auth0-springboot-api/build/reports/
auth0-api-java/build/reports/
auth0-springboot-api/build/reports/
10 changes: 10 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Validate Gradle Wrapper"
on: [pull_request]

jobs:
validation:
name: "validation/gradlew"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v5
Loading
Loading