-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run Gradle publish task on GitHub Actions
recently the publishment from Travis CI is quite unstable, it makes 4~5 staging registries and sometimes lack necessary files. when I use a node on Google Cloud the publishment becomes stable, so hope that using another cloud service solves the problem.
- Loading branch information
Showing
2 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@722adc6 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@081536e | ||
with: | ||
java-version: '8.0.x' | ||
- uses: actions/cache@cffae95 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build | ||
run: | | ||
echo $GPG_PRIV_KEY > secring.text | ||
gpg --import --batch secring.text | ||
echo ossrhUsername=eller86 >> gradle.properties | ||
echo "ossrhPassword=${SONATYPE_PASSWORD}" >> gradle.properties | ||
echo "signing.keyId=${SIGNING_KEY_ID}" >> gradle.properties | ||
echo "signing.password=${SIGNING_PASSWORD}" >> gradle.properties | ||
./gradlew publish --no-daemon | ||
env: | ||
GPG_PRIV_KEY: ${{ secrets.GPG_PRIV_KEY }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} |
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