Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed May 22, 2024
1 parent 2f6ec11 commit e14a324
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
test:
strategy:
matrix:
os: [macos-14, windows-latest, ubuntu-latest]
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: ubuntu-latest
GRADLE_ARGS: |
Expand All @@ -29,7 +29,7 @@ jobs:
:extensions:colormath-ext-android-colorint:check
:extensions:colormath-ext-android-color:check
--stacktrace
- os: macos-14
- os: macos-latest
GRADLE_ARGS: |
macosX64Test
:colormath:compileKotlinMacosArm64
Expand All @@ -54,8 +54,7 @@ jobs:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
with:
arguments: ${{matrix.GRADLE_ARGS}}
- run: ./gradlew ${{matrix.GRADLE_ARGS}}
- name: Upload the build report
if: failure()
uses: actions/upload-artifact@master
Expand All @@ -64,19 +63,18 @@ jobs:
path: '**/build/reports'
publish:
needs: test
runs-on: macos-14
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'ajalt/colormath' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- name: Deploy to sonatype
uses: gradle/actions/setup-gradle@v3
with:
# disable configuration cache due to https://github.com/gradle/gradle/issues/22779
arguments: publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache
# disable configuration cache due to https://github.com/gradle/gradle/issues/22779
run: ./gradlew publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
Expand Down
53 changes: 28 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,42 @@ on:

jobs:
release:
runs-on: macos-14
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: gradle/actions/setup-gradle@v3
# - uses: actions/setup-python@v5
# with:
# python-version: '3.12'
- run: ./gradlew publishToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
- name: Create release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.extract-release-notes.outputs.release_notes }}
- name: Dokka
uses: gradle/actions/setup-gradle@v3
with:
arguments: dokkaHtml :website:wasmJsBrowserDistribution
- run: ./prepare_docs.sh
- name: Build mkdocs
run: |
pip install mkdocs-material
mkdocs build
- name: Deploy docs to website
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: site
# - name: Extract release notes
# id: extract-release-notes
# uses: ffurrer2/extract-release-notes@v2
# - name: Create release
# uses: ncipollo/release-action@v1
# with:
# body: ${{ steps.extract-release-notes.outputs.release_notes }}
# - name: Dokka
# uses: gradle/actions/setup-gradle@v3
# with:
# arguments: dokkaHtml :website:wasmJsBrowserDistribution
# - run: ./prepare_docs.sh
# - name: Build mkdocs
# run: |
# pip install mkdocs-material
# mkdocs build
# - name: Deploy docs to website
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: gh-pages
# folder: site
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Dfile.encoding=UTF-8"

0 comments on commit e14a324

Please sign in to comment.