Skip to content

Commit

Permalink
Fix release process for macOS runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoepelman committed Jul 7, 2024
1 parent 3556e95 commit e445050
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 26 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ on:
branches:
- main
tags:
- 'v*'
- 'v[0-9].[0-9].[0-9]'
permissions:
contents: read
issues: write
jobs:
test:
uses: ./.github/workflows/test.yml
release:
name: release
create-artifacts:
# First run the normal tests
needs: [test]
# Release on macOS for the macOS build targets
# macOS can release the other build targets too but not vice-versa
runs-on: macos-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
is_snapshot: ${{ steps.get-version.outputs.is_snapshot }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down Expand Up @@ -66,36 +68,28 @@ jobs:
- name: Publish version '${{ steps.get-version.outputs.version }}' to sonatype & close staging repo
env:
CI_VERSION: ${{ steps.get-version.outputs.version }}
IS_SNAPSHOT: ${{ steps.get-version.outputs.is_snapshot }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
MAVEN_CENTRAL_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }}
MAVEN_CENTRAL_TOKEN_PW: ${{ secrets.MAVEN_CENTRAL_TOKEN_PW }}
run: |
echo "Publishing version '$CI_VERSION' to sonatype."
if [[ $IS_SNAPSHOT == "true" ]]; then
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --info
else
./gradlew publishToSonatype closeSonatypeStagingRepository --info
fi
./gradlew publishToSonatype closeSonatypeStagingRepository --info
- uses: trstringer/manual-approval@v1
name: "Wait for approval to publish version '${{ steps.get-version.outputs.version }}'"
if: ${{ steps.get-version.outputs.is_snapshot == 'false' }}
release:
needs: [create-artifacts]
runs-on: ubuntu-latest
environment: ${{needs.create-artifacts.outputs.is_snapshot=='false' && 'maven-central-release' || 'maven-central-snapshot'}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
secret: ${{ github.TOKEN }}
approvers: dhoepelman,nlochschmidt
minimum-approvals: 1
issue-title: "Release version '${{ steps.get-version.outputs.version }}'"
issue-body: "Please approve or deny the release of version '${{ steps.get-version.outputs.version }}'."
# Default included: "approve", "approved", "lgtm", "yes"
additional-approved-words: ''
# Default included: "deny", "denied", "no"
additional-denied-words: ''
distribution: temurin
java-version: 21
cache: 'gradle'

- name: "Release version '${{ steps.get-version.outputs.version }}'"
if: ${{ steps.get-version.outputs.is_snapshot == 'false' }}
- name: "Release version '${{needs.create-artifacts.outputs.version}}'"
env:
CI_VERSION: ${{ steps.get-version.outputs.version }}
CI_VERSION: ${{needs.create-artifacts.outputs.version}}
MAVEN_CENTRAL_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }}
MAVEN_CENTRAL_TOKEN_PW: ${{ secrets.MAVEN_CENTRAL_TOKEN_PW }}
run: ./gradlew findSonatypeStagingRepository releaseSonatypeStagingRepository --info
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.konform:konform:0.6.0")
implementation("io.konform:konform:0.6.1")
}
}
}
Expand All @@ -27,7 +27,7 @@ For jvm-only projects add:

```
dependencies {
implementation("io.konform:konform-jvm:0.6.0")
implementation("io.konform:konform-jvm:0.6.1")
}
```

Expand Down

0 comments on commit e445050

Please sign in to comment.