-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (54 loc) · 2.2 KB
/
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
name: Release
concurrency: ci-${{ github.ref }}
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Setup Java
run: |
echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- uses: actions/cache@v3
with:
path: |
**/.gradle/caches
**/.gradle/repositories
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- uses: gradle/gradle-build-action@v2
name: Setup Gradle
- name: Tag Release
run: |
./gradlew tagRelease
env:
BUILD_CACHE_URL: ${{ secrets.BUILD_CACHE_URL }}
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PASSWORD: ${{ secrets.BUILD_CACHE_PASSWORD }}
- name: Build
run: |
./gradlew build
env:
BUILD_CACHE_URL: ${{ secrets.BUILD_CACHE_URL }}
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PASSWORD: ${{ secrets.BUILD_CACHE_PASSWORD }}
- name: Publish
run: |
./gradlew publish curseforge modrinth closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
MODRINTH_KEY: ${{ secrets.MODRINTH_KEY }}
BUILD_CACHE_URL: ${{ secrets.BUILD_CACHE_URL }}
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PASSWORD: ${{ secrets.BUILD_CACHE_PASSWORD }}
- run: |
git push
git push --tags