release: v0.10.0 #17
Workflow file for this run
This file contains 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: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
# allows the action to create a release | |
contents: write | |
env: | |
CI: true | |
RELEASE: true | |
BUILD_NUMBER: ${{ github.run_number }} | |
SCM_TAG: ${{ github.sha }} | |
GRADLE_OPTS: | | |
-Dorg.gradle.caching=false | |
-Dorg.gradle.configuration-cache=false | |
-Dorg.gradle.daemon=false | |
-Dorg.gradle.unsafe.watch-fs=false | |
-Dorg.gradle.vfs.watch=false | |
jobs: | |
gh_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare release settings | |
run: | | |
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME" | |
RELEASE_PRE=false | |
RELEASE_SUFFIX="" | |
# Check release type | |
if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' || $GITHUB_REF_NAME =~ 'rc' ]]; then | |
echo "This is a pre-release!" | |
RELEASE_PRE=true | |
RELEASE_SUFFIX=" (pre release)" | |
fi | |
echo "RELEASE_PRE=$RELEASE_PRE" >> $GITHUB_ENV | |
echo "RELEASE_SUFFIX=$RELEASE_SUFFIX" >> $GITHUB_ENV | |
- name: GitHub Release | |
# https://github.com/anton-yurchenko/git-release#readme | |
uses: docker://antonyurchenko/git-release:latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DRAFT_RELEASE: "true" | |
PRE_RELEASE: "${{ env.RELEASE_PRE }}" | |
RELEASE_NAME_SUFFIX: "${{ env.RELEASE_SUFFIX }}" | |
CHANGELOG_FILE: "CHANGELOG.md" | |
ALLOW_EMPTY_CHANGELOG: "false" | |
publish_release: | |
runs-on: macos-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
disable-sudo: true | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: 'Set up JDK 22' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '22' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: release-candidate | |
cache-disabled: true | |
cache-read-only: true | |
- name: Publish plugin | |
if: always() && github.repository == 'fluxo-kt/fluxo-kmp-conf' | |
env: | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
RELEASE: true | |
run: > | |
./gradlew publishPlugins --no-build-cache --no-configuration-cache --stacktrace --scan | |
-Pgradle.publish.key="${{ secrets.GRADLE_PUBLISH_KEY }}" | |
-Pgradle.publish.secret="${{ secrets.GRADLE_PUBLISH_SECRET }}" | |
# References | |
# https://github.com/studiometa/vue-mapbox-gl/blob/8c3ca5a/.github/workflows/release.yml#L26 |