Skip to content

Merge pull request #10 from appswithlove/main #21

Merge pull request #10 from appswithlove/main

Merge pull request #10 from appswithlove/main #21

Workflow file for this run

name: Publish
on:
push:
branches: [ production ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to Maven Central Portal
run: ./gradlew :lib:publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish to Gradle Plugin Portal
run: ./gradlew :lib:publishPlugins --no-configuration-cache
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Extract version from gradle.properties
id: get_version
run: echo "version=$(grep VERSION_NAME gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: ${{ steps.get_version.outputs.version }}
body: |
Automated release ${{ steps.get_version.outputs.version }}
Published to:
- Maven Central Portal
- Gradle Plugin Portal
draft: false
prerelease: false