-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (53 loc) · 1.9 KB
/
publish-release.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
name: Publish Releases
on:
release:
types: [published]
jobs:
build:
name: Build artifacts job
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.OS }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.OS }}-gradle-
- name: Build artifacts
env:
REPO_SAYAN_USER: ${{ secrets.REPO_SAYAN_USER }}
REPO_SAYAN_TOKEN: ${{ secrets.REPO_SAYAN_TOKEN }}
run: ./gradlew build
- name: Publish to SayanDevelopment snapshot repo
run: ./gradlew publish
env:
REPO_SAYAN_USER: ${{ secrets.REPO_SAYAN_USER }}
REPO_SAYAN_TOKEN: ${{ secrets.REPO_SAYAN_TOKEN }}
- name: Publish to Hangar
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
HANGAR_BUILD_CHANNEL: Release
HANGAR_CHANGELOG: ${{ github.event.release.body }}
REPO_SAYAN_USER: ${{ secrets.REPO_SAYAN_USER }}
REPO_SAYAN_TOKEN: ${{ secrets.REPO_SAYAN_TOKEN }}
run: ./gradlew build publishPluginPublicationToHangar --stacktrace
- name: Publish to Modrinth
run: ./gradlew modrinth
env:
MODRINTH_BUILD_CHANNEL: release
MODRINTH_API_TOKEN: ${{ secrets.MODRINTH_API_TOKEN }}
MODRINTH_CHANGELOG: ${{ github.event.release.body }}
REPO_SAYAN_USER: ${{ secrets.REPO_SAYAN_USER }}
REPO_SAYAN_TOKEN: ${{ secrets.REPO_SAYAN_TOKEN }}