-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (81 loc) · 2.25 KB
/
release.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Gradle Package
on:
push:
tags:
- '*'
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate changelog
run: /bin/sh ./changes.sh ${{ github.ref_name }} ./changelog.out.md
- name: Upload changelog
uses: actions/upload-artifact@v3
with:
name: changelog
path: ./changelog.out.md
retention-days: 5
build:
name: Build
runs-on: ubuntu-latest
needs: [ changelog ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Download changelog
uses: actions/download-artifact@v3
with:
name: changelog
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@v2
with:
arguments: publish
cache-read-only: false
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
CS_USERNAME: "codedsakura"
CS_TOKEN: ${{ secrets.CODEDSAKURA_MAVEN_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG_PATH: "./changelog.out.md"
- name: Upload build output (libs)
uses: actions/upload-artifact@v3
with:
name: libs
path: build/libs/
- name: Upload build output (devlibs)
uses: actions/upload-artifact@v3
with:
name: devlibs
path: build/devlibs/
release:
name: Create a release
runs-on: ubuntu-latest
needs: [ changelog, build ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build output
uses: actions/download-artifact@v3
with:
name: changelog
- name: Download libs
uses: actions/download-artifact@v3
with:
name: libs
path: build/libs/
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "build/libs/*.jar"
prerelease: false
token: ${{ secrets.PA_TOKEN }}
bodyFile: ./changelog.out.md