Skip to content

3.0.1-beta01 (#89)

3.0.1-beta01 (#89) #69

Workflow file for this run

name: Publish a new Release
on:
push:
tags:
- '3.*'
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: 'Tag to use for the release and changelog'
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
check-latest: true
java-version: 22
cache: 'gradle'
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" | base64 --decode > local.properties
- name: Cache konan directory
uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('*.gradle.kts', 'buildSrc/*') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Assemble android sample
run: ./gradlew :sample:assembleRelease
- name: Publish to sonatype
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToMavenCentral --no-configuration-cache
- name: Generate Changelog
uses: mikepenz/release-changelog-builder-action@v5
id: build_changelog
with:
commitMode: true
configuration: ".github/changelog_config.json"
- name: Create GH release
uses: ncipollo/[email protected]
id: create_release
with:
draft: true
artifactErrorsFailBuild: true
prerelease: false
artifacts: sample/build/outputs/apk/release/pro.respawn.flowmvi.sample.apk
body: ${{steps.build_changelog.outputs.changelog}}
tag: ${{ inputs.tag != '' && inputs.tag || github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}