Skip to content

Commit

Permalink
ci: run Gradle publish task on GitHub Actions
Browse files Browse the repository at this point in the history
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
KengoTODA committed Feb 10, 2020
1 parent 9d3bf6a commit 8f7df19
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
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 }}
16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,3 @@ deploy:
on:
tags: true
jdk: openjdk8
- provider: script
skip_cleanup: true
# wait until uploading task finishes, because it may cost more than 10 minutes without any output
# https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
script: .travis/travis_wait "./gradlew publish"
on:
jdk: openjdk8
branch: master
- provider: script
skip_cleanup: true
# wait until uploading task finishes, because it may cost more than 10 minutes without any output
# https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
script: .travis/travis_wait "./gradlew publish"
on:
tags: true
jdk: openjdk8

0 comments on commit 8f7df19

Please sign in to comment.