Revert "Merge pull request #4 from changusmc/github_actions"
This reverts commit7361573b83
, reversing changes made toe79ae4362f
.
This commit is contained in:
parent
ad6515d2c5
commit
a674b49151
2 changed files with 9 additions and 71 deletions
64
.github/workflows/.ci_test_and_publish.yml
vendored
64
.github/workflows/.ci_test_and_publish.yml
vendored
|
@ -1,64 +0,0 @@
|
||||||
# This workflow will build the project with Gradle, run integration tests, and release.
|
|
||||||
# Because secrets are not available on external forks, this job is expected to fail
|
|
||||||
# on external pull requests.
|
|
||||||
|
|
||||||
name: Build project & run tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'changusmc/Store' && github.ref == 'refs/heads/main'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up our JDK environment
|
|
||||||
uses: actions/setup-java@v1.4.3
|
|
||||||
with:
|
|
||||||
java-version: 1.8
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
run: tools/release/deploy_snapshot.sh
|
|
||||||
env:
|
|
||||||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
|
|
||||||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
|
||||||
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
||||||
SIGNING_ID: ${{ secrets.SIGNING_ID }}
|
|
||||||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Clean up Artifacts
|
|
||||||
run: tools/release/deploy_cleanup.sh
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
api-level:
|
|
||||||
- 29
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up our JDK environment
|
|
||||||
uses: actions/setup-java@v1.4.3
|
|
||||||
with:
|
|
||||||
java-version: 1.8
|
|
||||||
- name: Run tests
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
with:
|
|
||||||
api-level: 29
|
|
||||||
script: ./gradlew clean cleanBuildCache check --stacktrace
|
|
||||||
env:
|
|
||||||
API_LEVEL: ${{ matrix.api-level }}
|
|
||||||
- name: Upload code coverage
|
|
||||||
run: bash <(curl -s https://codecov.io/bash)
|
|
|
@ -5,22 +5,24 @@
|
||||||
# Adapted from https://coderwall.com/p/9b_lfq and
|
# Adapted from https://coderwall.com/p/9b_lfq and
|
||||||
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
|
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
SLUG="dropbox/Store"
|
SLUG="dropbox/Store"
|
||||||
JDK="oraclejdk8"
|
JDK="oraclejdk8"
|
||||||
BRANCH="main"
|
BRANCH="main"
|
||||||
=======
|
|
||||||
BRANCH="master"
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "${GITHUB_REF##*/}" != "$BRANCH" ]; then
|
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
|
||||||
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '${GITHUB_REF##*/}'."
|
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
|
||||||
|
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
|
||||||
|
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
|
||||||
|
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
echo "Skipping snapshot deployment: was pull request."
|
||||||
|
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
|
||||||
|
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
|
||||||
else
|
else
|
||||||
echo "Deploying store..."
|
echo "Deploying store..."
|
||||||
openssl aes-256-cbc -md sha256 -d -in tools/release/secring.gpg.aes -out tools/release/secring.gpg -k "${ENCRYPT_KEY}"
|
openssl aes-256-cbc -md sha256 -d -in tools/release/secring.gpg.aes -out tools/release/secring.gpg -k "${ENCRYPT_KEY}"
|
||||||
# https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials
|
# https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials
|
||||||
./gradlew uploadArchives -PSONATYPE_USERNAME="${SONATYPE_USERNAME}" -PSONATYPE_PASSWORD="${SONATYPE_PASSWORD}" -Psigning.keyId="${SIGNING_ID}" -Psigning.password="${SIGNING_PASSWORD}" -Psigning.secretKeyRingFile=${PWD}/tools/release/secring.gpg
|
./gradlew uploadArchives -PSONATYPE_USERNAME="${SONATYPE_USERNAME}" -PSONATYPE_PASSWORD="${SONATYPE_PASSWORD}" -Psigning.keyId="${SIGNING_ID}" -Psigning.password="${SIGNING_PASSWORD}" -Psigning.secretKeyRingFile=${PWD}/tools/release/secring.gpg
|
||||||
echo "Store deployed!"
|
echo "Store deployed!"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue