Skip to content

Commit 3ef5b67

Browse files
committed
github action publish.yml
1 parent c19d4f2 commit 3ef5b67

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
# We'll run this workflow when a new GitHub release is created
6+
types: [released]
7+
8+
jobs:
9+
publish:
10+
name: Release build and publish
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v2
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v2
17+
with:
18+
distribution: adopt
19+
java-version: 11
20+
21+
# Builds the release artifacts of the library
22+
- name: Release build
23+
run: ./gradlew :bottomsheetdialog-compose:assembleRelease
24+
25+
# Generates other artifacts
26+
- name: Source jar
27+
run: ./gradlew androidSourcesJar
28+
29+
# Runs upload, and then closes & releases the repository
30+
- name: Publish to MavenCentral
31+
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
32+
env:
33+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
34+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
35+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
36+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
37+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
38+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

0 commit comments

Comments
 (0)