fix release workflow #19
This file contains hidden or 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: Publish - Release | |
| on: | |
| push: | |
| branches: | |
| - fix/release-workflow | |
| release: | |
| types: [released] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project sources | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK and Maven Central | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'adopt' | |
| cache: 'gradle' | |
| server-id: central | |
| server-username: ${{ secrets.MAVEN_USERNAME }} | |
| server-password: ${{ secrets.MAVEN_PASSWORD }} | |
| - name: Setup Gradle | |
| uses: gradle/gradle-build-action@v2 | |
| - name: Setup local.properties | |
| run: | | |
| cat << EOF >> local.properties | |
| sdk.dir=$ANDROID_HOME | |
| host="${{ secrets.HOST }}" | |
| APIKey="${{ secrets.API_KEY }}" | |
| deliveryToken="${{ secrets.DELIVERY_TOKEN }}" | |
| environment="${{ secrets.ENVIRONMENT }}" | |
| contentType="${{ secrets.CONTENT_TYPE }}" | |
| assetUid="${{ secrets.ASSET_UID }}" | |
| EOF | |
| - name: Gradle build and clean | |
| run: | | |
| ./gradlew clean build | |
| - name: Publish to Maven Central | |
| run: | | |
| ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingInMemoryKey }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.signingInMemoryKeyId }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingInMemoryKeyPassword }} |