Skip to content

Update kotlin to v1.9.0 #1

Update kotlin to v1.9.0

Update kotlin to v1.9.0 #1

Workflow file for this run

name: Release
on:
push:
paths:
- '**/src/**/*'
branches:
- master
workflow_dispatch:
inputs:
version:
required: false
description: Package version to publish under
skipPages:
description: Should we skip releasing GitHub pages
required: false
default: "y"
skipMavenCentral:
description: Should we skip publishing artefacts to Maven Central
required: false
default: "y"
skipGitHub:
description: Should we skip publishing artefacts to GitHub Packages
required: false
default: "y"
release:
types: [ created ]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
concurrency:
cancel-in-progress: false
group: release-${{ github.workflow }}-${{ github.head_ref || github.ref }}
jobs:
check:
uses: ./.github/workflows/check.yml
resolve-version:
uses: ./.github/workflows/resolve-version.yml
needs: [ check ]
with:
desired-version: ${{ github.event.release.tag_name || github.event.inputs.version }}
release-Artefacts:
name: Release to ${{ matrix.repository.name }} on ${{ matrix.os.runner }}
runs-on: ${{ matrix.os.runner }}
continue-on-error: true
needs:
- check
- resolve-version
defaults:
run:
shell: ${{ matrix.os.shell }}
env:
VERSION: ${{ needs.resolve-version.outputs.version }}
GH_USERNAME: ${{ github.actor }}
GH_PASSWORD: ${{ github.token }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
strategy:
matrix:
repository:
- name: Github Packages
tasks: publishAllPublicationsToGitHubRepository
enabled: ${{ github.event.inputs.skipGitHub != 'y' }}
- name: Maven Central
# `closeSonatypeStagingRepository` Requires to manually release a new version on https://s01.oss.sonatype.org/#stagingRepositories
# If you're brave, you could change it to `closeAndReleaseSonatypeStagingRepository` to fully automate the release
tasks: publishToSonatype closeAndReleaseSonatypeStagingRepository
enabled: ${{ github.event.inputs.skipMavenCentral != 'y' }}
os:
# - runner: macos-latest
# shell: bash
# - runner: windows-latest
# shell: msys2 {0}
- runner: ubuntu-latest
shell: bash
steps:
- uses: msys2/setup-msys2@v2
if: ${{ matrix.repository.enabled == true && runner.os == 'Windows' }}
with:
release: false
msystem: MINGW64
update: true
path-type: inherit
install: >-
mingw-w64-x86_64-curl
curl
- uses: actions/checkout@v3
if: ${{ matrix.repository.enabled == true }}
- uses: actions/setup-java@v3
if: ${{ matrix.repository.enabled == true }}
with:
distribution: 'adopt'
java-version: 11
- name: Restore Gradle cache
if: ${{ matrix.repository.enabled == true }}
id: cache-gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.gradle/yarn
~/.gradle/nodejs
~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Gradle Publish to ${{ matrix.repository.name }}
if: ${{ matrix.repository.enabled == true }}
run: ./gradlew ${{ matrix.repository.tasks }} -Pversion=${VERSION//v} --scan
release-Pages:
name: Release GitHub Pages
needs: [ check, resolve-version ]
if: ${{ github.event.inputs.skipPages != 'y' && needs.resolve-version.outputs.snapshot == 'false' }}
uses: ./.github/workflows/deploy-pages.yml
with:
version: ${{ needs.resolve-version.outputs.version }}
finalise:
runs-on: ubuntu-latest
needs: [ release-Pages, resolve-version ]
if: ${{ github.event.inputs.skipPages != 'y' && needs.resolve-version.outputs.snapshot == 'false' }}
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v3
- name: Change pre-release status
run: gh release edit ${{ needs.resolve-version.outputs.version }} --prerelease=false