Skip to content

Publish

Publish #3

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Set env
run: |
echo 'GRADLE_PUBLISH_KEY=${{ secrets.GRADLE_PUBLISH_KEY }}' >> $GITHUB_ENV
echo 'GRADLE_PUBLISH_SECRET=${{ secrets.GRADLE_PUBLISH_SECRET }}' >> $GITHUB_ENV
- name: Gradle clean
run: |
./gradlew clean
- name: Gradle build
run: |
./gradlew build
- name: Gradle publish to mavenLocal
run: |
./gradlew publishToMavenLocal
- name: Run basic example
run: |
cd examples/basic
./gradlew clean --refresh-dependencies
- name: Run change file example
run: |
cd examples/change_file
./gradlew clean --refresh-dependencies
echo 'dotenv.filename=.env.staging' > gradle.properties
./gradlew clean
- name: Run change template file example
run: |
cd examples/change_template_file
./gradlew clean --refresh-dependencies
- name: Run hierarchical definitions example
run: |
cd examples/hierarchical_definitions
./gradlew clean --refresh-dependencies
- name: publish
run: |
PUBLISH_PRODUCTION=1 ./gradlew publishPlugins