-
Notifications
You must be signed in to change notification settings - Fork 82
63 lines (60 loc) · 2.03 KB
/
deployment-ci.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This workflow will build a package using Gradle and then publish it to maven
name: Kotlin CI
on:
push:
branches:
- '**' # We want to run this on all branch pushes
tags-ignore:
- '**' # We don't want this to run on tags pushes
pull_request:
release:
types: [ published ]
jobs:
build:
name: Build Kord
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
&& !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'kordlib/kord')
env:
KORD_TEST_TOKEN: ${{ secrets.KORD_TEST_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew --stacktrace --info build
release:
name: Publish artifacts
runs-on: ubuntu-latest
needs: build
if: |
!contains(github.event.head_commit.message, '[publish skip]') && github.event_name != 'pull_request' && github.ref != 'refs/heads/master'
env:
KORD_TEST_TOKEN: ${{ secrets.KORD_TEST_TOKEN }}
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
KORD_REPO_USER: ${{ secrets.KORD_REPO_USER }}
KORD_REPO_PASSWORD: ${{ secrets.KORD_REPO_PASSWORD }}
SIGNING_KEY: ${{ secrets.signingKey }}
SIGNING_PASSWORD: ${{ secrets.signingPassword }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew --stacktrace --info build
- name: Publish with Gradle
run: ./gradlew --no-parallel -x test publish