diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e118e1b..f00adb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,11 +13,21 @@ jobs: - uses: actions/checkout@v2 - name: Set up JDK uses: actions/setup-java@v1 + env: + PGP_PASSPHRASE: ${{ secrets.PGP_SECRET }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} with: java-version: 8 + gpg-private-key: ${{ secrets.PGP_SECRET }} + gpg-passphrase: PGP_PASSPHRASE + server-username: SONATYPE_USERNAME + server-password: SONATYPE_PASSWORD - name: print Java version run: java -version - name: Build with Maven + env: + PGP_KEYID: ${{ secrets.PGP_KEYID }} run: | if [[ "$GITHUB_REF" = refs/heads/* ]]; then export VERSIONING_GIT_BRANCH=${GITHUB_REF#refs/heads/}; @@ -27,6 +37,4 @@ jobs: export VERSIONING_GIT_BRANCH=${GITHUB_REF#refs/}; VERSIONING_GIT_BRANCH=${VERSIONING_GIT_BRANCH%/merge}; fi - mvn clean deploy -Possrh --settings settings.xml - - + mvn clean deploy -Possrh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 89ac8e9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: scala - -# Currently skip building on master. PR validation and release attempts are the gatekeepers for test validation. -# This is only necessary currently as sbt-sonatype doesn't track which staging repo it uses, -# so sonatypeClose and sonatypeRelease get confused if multiple builds are going on at the same time. -# Currently, the maximum concurrent builds is set to "1" to avoid this race condition. -# -# This means that during releases, when the release notes are pushed to master, that triggers a build. -# Travis doesn't know it's safe to do a relase build (tag build) at the same time as the safety net master build, -# so the release build is always delayed by a full test run unnecessarily. -branches: - except: - - master - -script: -- mvn clean compile - -# Cache configs taken from https://www.scala-sbt.org/1.0/docs/Travis-CI-with-sbt.html -before_cache: - # Cleanup the cached directories to avoid unnecessary cache updates - - rm -fv $HOME/.ivy2/.sbt.ivy.lock - - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete - - find $HOME/.sbt -name "*.lock" -print -delete -cache: - directories: - - $HOME/.m2/repository/ - -# Releasing configs taken from https://github.com/scalacenter/sbt-release-early/wiki/How-to-release-in-Travis-(CI) -before_install: -- if [ $TRAVIS_PULL_REQUEST = 'false' ] && [[ "$TRAVIS_TAG" = v* ]]; then - openssl aes-256-cbc -K $encrypted_9eb262af688a_key -iv $encrypted_9eb262af688a_iv -in travis/secrets.tar.enc -out travis/local.secrets.tar -d; - tar xv -C travis -f travis/local.secrets.tar; - gpg --fast-import travis/local.secring.asc; - fi -after_success: -- if [ $TRAVIS_PULL_REQUEST = 'false' ] && [[ "$TRAVIS_TAG" = v* ]] && ! grep -- -SNAPSHOT pom.xml; then - mvn clean deploy -Possrh --settings settings.xml; - mvn clean deploy -Pbintray --settings settings.xml; - fi diff --git a/settings.xml b/settings.xml deleted file mode 100644 index 08f74bd..0000000 --- a/settings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - bintray-twilio-releases - ${env.BINTRAY_USER} - ${env.BINTRAY_PASS} - - - ossrh - ${env.SONATYPE_USERNAME} - ${env.SONATYPE_PASSWORD} - - - diff --git a/travis/secrets.tar.enc b/travis/secrets.tar.enc deleted file mode 100644 index dc28f48..0000000 Binary files a/travis/secrets.tar.enc and /dev/null differ