-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (62 loc) · 2.1 KB
/
deploy-production.yml
File metadata and controls
62 lines (62 loc) · 2.1 KB
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
name: "Build and Deploy [production]"
on:
release:
types: [published,edited]
jobs:
build:
name: "Build and Deploy [production]"
# Set up the OS
runs-on: ubuntu-latest
env:
# Sonatype Credentials & GitHub token
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
PUBLIC_KEY: '${{ secrets.PUBLIC_KEY }}'
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}'
SIGNING_PASSWORD: '${{ secrets.SIGNING_PASSWORD }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
# Set environment
ENV: 'prod'
steps:
# Checkout the Code
- name: Checkout Code
uses: actions/checkout@v4
# Set up git hashes environment variables
- name: Git Hashes
uses: Im-Fran/git-hashes-action@v1.0.3
# Set up version from tag environment variables
- name: Version from Tag Action
uses: Im-Fran/version-from-tag-action@v1.0.3
with:
remove-first-character: 'v'
# Set up the JDK
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 21
# Clean, Test, Publish and Build (in that order to save the artifact to the action)
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: clean test shadowJar dokkaHtml publish sonatypeCentralUpload
# Now we store the artifact in the action
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: SimpleCoreAPI
path: ./build/libs/simplecoreapi.jar
# Here we upload the binary to the release
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: ./build/libs/simplecoreapi.jar application/java-archive
# Now we deploy the documents to GitHub pages
- name: Deploy Dokka
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
branch: gh-pages
folder: build/dokka
clean: true
clean-exclude: |
CNAME