Bump ihub-pub/bot from 2.0.0 to 2.0.1 (#8) #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
schedule: | |
- cron: '0 16 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Chmod | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v2.11.0 | |
with: | |
arguments: build -x test --scan | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: 'gradle' | |
# - name: Testspace Setup CLI | |
# uses: testspace-com/setup-testspace@ee1482f978eb5010ec27b6f6372904f01f2edd68 # v1.0.6 | |
# with: | |
# domain: ${{ github.repository_owner }} | |
- name: Chmod | |
run: chmod +x ./gradlew | |
- name: Test with Gradle | |
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v2.11.0 | |
with: | |
arguments: test -DiHubTest.failFast=true | |
- name: Upload Coverage Reports | |
if: ${{ github.repository_owner == 'ihub-pub' }} | |
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# - name: Publish Results to Testspace | |
# run: testspace */build/test-results/test/*.xml */build/reports/*/test/*.xml | |
- name: Upload Test Result | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: tests | |
path: | | |
*/build/reports/tests | |
retention-days: 1 | |
publish: | |
if: ${{ github.event_name == 'push' && github.repository_owner == 'ihub-pub' }} | |
needs: build | |
name: Publish to Snapshot Repository | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java_version: [ 17 ] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
java-version: ${{ matrix.java_version }} | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Publish to Snapshot Repository | |
uses: ihub-pub/bot/publish@abd115201b1f66af6b6ab148aa391f2be7ad8960 # v2.0.1 | |
with: | |
repoUsername: ${{ secrets.REPO_USERNAME }} | |
repoPassword: ${{ secrets.REPO_PASSWORD }} | |
useInferringVersion: true |