-
Notifications
You must be signed in to change notification settings - Fork 128
44 lines (42 loc) · 2.11 KB
/
DEPLOY.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: DEPLOY
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
forced_version:
description: 'FORCED_VERSION to use'
required: true
type: string
env:
CI: true
FORCED_VERSION: ${{ inputs.forced_version || github.ref }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPEUSERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPEPASSWORD }}
JAVA_VERSION: 17
JAVA_DISTRIBUTION: zulu
jobs:
publish:
runs-on: macos-latest
steps:
- { name: Checkout, uses: actions/checkout@v3 }
- { name: Use Node.js 20.x, uses: actions/setup-node@v3, with: { node-version: 20.x } }
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace Gradle Wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- { name: Initialize Gradle, run: ./gradlew }
# To ensure we are fine before staging repository
- { name: Publish Publications To Maven Local, run: ./gradlew publishToMavenLocal }
- { name: Generate artifacts .tar.zstd, run: ./gradlew generateArtifactsTarZstd }
- { name: Start Maven Central Staging Repository, run: ./gradlew startReleasingMavenCentral }
- { name: Publish Publications To Maven Repository, run: "./gradlew publishAllPublicationsToMavenRepository publishJvmPublicationToMavenRepository" }
- { name: Release to Maven Central, run: ./gradlew releaseMavenCentral }
- name: Github Release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/korge-*.tar.zstd