Merge remote-tracking branch 'origin/master' #13
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
name: test-deploy-gradle-sora-plugin | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
test-deploy-plugin: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out the repo under $GITHUB_WORKSPACE, so that workflow accesses it | |
- uses: actions/checkout@e7e449dced768f0201582e76e92398df44e85f4f # v4.1.1 | |
- 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 | |
- 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 |