Skip to content

Commit 6fc5861

Browse files
committed
Improve workflows
1 parent 03f9df5 commit 6fc5861

File tree

2 files changed

+31
-24
lines changed

2 files changed

+31
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,4 @@ jobs:
104104
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
105105
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
106106
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
107-
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache
108-
109-
- name: Upload docs
110-
uses: actions/upload-pages-artifact@v4
111-
with:
112-
path: build/dokka/html
113-
114-
deployDocs:
115-
name: Deploy snapshot docs
116-
needs: [ buildAndTest, publishSnapshot ]
117-
runs-on: ubuntu-latest
118-
if: ${{ github.ref == 'refs/heads/main' && endsWith(needs.buildAndTest.outputs.version, '-SNAPSHOT') }}
119-
120-
121-
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
122-
permissions:
123-
pages: write # to deploy to Pages
124-
id-token: write # to verify the deployment originates from an appropriate source
125-
126-
steps:
127-
- name: Deploy docs
128-
uses: actions/deploy-pages@v4
107+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache

.github/workflows/release.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,46 @@ jobs:
5656
exit 1
5757
fi
5858
59+
- name: Build
60+
run: |
61+
./gradlew assemble
62+
63+
- name: Generate dokka docs
64+
run: |
65+
./gradlew dokkaGenerate
66+
67+
- name: Upload docs
68+
uses: actions/upload-pages-artifact@v4
69+
with:
70+
path: build/dokka/html
71+
5972
- name: Publish to Maven Central
6073
env:
6174
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
6275
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
6376
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
6477
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
6578
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
66-
run: ./gradlew :publishAndReleaseToMavenCentral --no-configuration-cache
79+
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
6780

6881
- name: Create GitHub Release
6982
uses: softprops/action-gh-release@v2
7083
with:
7184
tag_name: ${{ steps.get-version.outputs.version }}
7285
name: ${{ steps.get-version.outputs.version }}
73-
generate_release_notes: true
86+
generate_release_notes: true
87+
88+
deployDocs:
89+
name: Deploy docs
90+
runs-on: ubuntu-latest
91+
needs: release
92+
93+
94+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
95+
permissions:
96+
pages: write # to deploy to Pages
97+
id-token: write # to verify the deployment originates from an appropriate source
98+
99+
steps:
100+
- name: Deploy docs
101+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)