Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
monosoul committed Aug 12, 2024
1 parent 5a65434 commit b3649f9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 54 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
check jacocoTestReport -x :artifact-tests:test
- name: Run tests
run: |
./gradlew
--stacktrace
check jacocoTestReport -x :artifact-tests:test
- name: Test publishing
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
publishToMavenLocal
run: |
./gradlew
--stacktrace
publishToMavenLocal
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand All @@ -56,12 +56,13 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run artifact tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
:artifact-tests:check
- name: Run artifact tests
run: |
./gradlew
--stacktrace
:artifact-tests:check
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand All @@ -86,12 +87,13 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Publish plugin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
-Pversion=SNAPSHOT-${{ github.sha }}
assemble publishAllPublicationsToSnapshotRepository
- name: Publish plugin
run: |
./gradlew
-Pversion=SNAPSHOT-${{ github.sha }}
assemble publishAllPublicationsToSnapshotRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Snapshot coordinates comment
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/build-on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
check jacocoTestReport -x :artifact-tests:test
- name: Run tests
run: |
./gradlew
--stacktrace
check jacocoTestReport -x :artifact-tests:test
- name: Test publishing
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
publishToMavenLocal
run: |
./gradlew
--stacktrace
publishToMavenLocal
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand All @@ -56,12 +56,13 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run artifact tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
:artifact-tests:check
- name: Run artifact tests
run: |
./gradlew
--stacktrace
:artifact-tests:check
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand Down
41 changes: 22 additions & 19 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish plugin on release

on:
release:
types: [published]
types: [ published ]

jobs:
build:
Expand All @@ -16,12 +16,13 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
check -x :artifact-tests:test
- name: Run tests
run: |
./gradlew
--stacktrace
check -x :artifact-tests:test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand All @@ -42,12 +43,13 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Run artifact tests
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
--stacktrace
:artifact-tests:check
- name: Run artifact tests
run: |
./gradlew
--stacktrace
:artifact-tests:check
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
Expand All @@ -70,22 +72,23 @@ jobs:
with:
distribution: 'temurin'
java-version: '21'
- name: Publish plugin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish plugin
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_withSigning: true
with:
arguments: |
-Pversion=${{ github.event.release.tag_name }}
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
--stacktrace
assemble publishToSonatype closeAndReleaseSonatypeStagingRepository publishPlugins
run: |
./gradlew
-Pversion=${{ github.event.release.tag_name }}
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
--stacktrace
assemble publishToSonatype closeAndReleaseSonatypeStagingRepository publishPlugins
- name: Attach artifacts to the release
uses: svenstaro/upload-release-action@v2
with:
Expand Down

0 comments on commit b3649f9

Please sign in to comment.