-
Notifications
You must be signed in to change notification settings - Fork 65
56 lines (55 loc) · 1.87 KB
/
release-please.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
on:
workflow_dispatch:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
environment: release
outputs:
release_created: ${{ steps.release.outputs.release_created }}
upload_url: ${{ steps.release.outputs.upload_url }}
# https://github.com/google-github-actions/release-please-action in case more config is needed
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{ secrets.PAT }}
# See how to configure file https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md
# See output info at https://github.com/google-github-actions/release-please-action#configuration for variables
# Possibly optimise this by building and then passing the folder across to these stages
release:
strategy:
fail-fast: false
matrix:
release-task: [curseforge, discordupload, modrinth]
needs: release-please
runs-on: ubuntu-latest
environment: release
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v3
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 16
- name: Build and publish (release)
env:
CURSE_API: ${{ secrets.CURSE_API }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_RELEASE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
IS_RELEASE: true
run: |
# Build
./gradlew build ${{ matrix.release-task }}