Skip to content

test-deploy-gradle-sora-plugin #110

test-deploy-gradle-sora-plugin

test-deploy-gradle-sora-plugin #110

name: test-deploy-gradle-sora-plugin
on: [pull_request, create]
jobs:
test-deploy-plugin:
runs-on: ubuntu-latest
steps:
# Checks-out the repo under $GITHUB_WORKSPACE, so that workflow accesses it
- uses: actions/checkout@v2
- name: Store gradle key & secret into gradle.properties
env:
GRADLE_KEY: ${{ secrets.GRADLE_KEY }}
GRADLE_SECRET: ${{ secrets.GRADLE_SECRET }}
run: |
mkdir -p ~/.gradle/
echo gradle.publish.key=${GRADLE_KEY} >> ~/.gradle/gradle.properties
echo gradle.publish.secret=${GRADLE_SECRET} >> ~/.gradle/gradle.properties
- name: Check for new tag created # and set TAG_NAME
if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}
run: |
echo "plugin_tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Make scripts executable
run: |
chmod +x gradlew
- name: Run Gradle Wrapper Daemon, Build, then Test
run: |
export TAG_NAME=${{ env.plugin_tag }}
./gradlew --daemon
./gradlew build -x test
./gradlew publishToMavenLocal
./gradlew test
- name: Run Publish # if new tag created
if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}
run: |
export TAG_NAME=${{ env.plugin_tag }}
./gradlew publishPlugins