-
Notifications
You must be signed in to change notification settings - Fork 9
102 lines (89 loc) · 3.15 KB
/
release-cf-alpha.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
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
99
100
101
102
name: Release Curseforge Alpha Build
env:
GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}"
on:
workflow_dispatch:
inputs:
diagnostic_mode:
description: Diagnostic Mode
type: boolean
default: false
required: true
jobs:
vars:
name: Get Variables
runs-on: ubuntu-22.04
outputs:
cf_project: ${{steps.gradle_props.outputs.cf_project}}
mcVersion: ${{steps.gradle_props.outputs.minecraft_version}}
forgeVersion: ${{steps.gradle_props.outputs.forge_version}}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read MC and Forge versions
id: gradle_props
uses: christian-draeger/[email protected]
with:
path: "gradle.properties"
properties: "minecraft_version forge_version cf_project"
get-package-info:
name: Get Latest Package Info
runs-on: ubuntu-22.04
needs: [ publish-gh-package ]
outputs:
version: ${{ steps.download-info.outputs.version }}
steps:
- name: Download Package Info
id: download-info
uses: compactmods/[email protected]
env:
GQL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
owner: compactmods
repo: compactcrafting
group: dev.compactmods.compactcrafting
filter: "^compactcrafting-(?:[\\d\\.]+)-nightly.jar$"
outputFile: compactcrafting-nightly.json
- name: Debug output
run: |
echo "Version: ${{ steps.download-info.outputs.version }}"
cat compactcrafting-nightly.json
- name: Read info into variable [latest]
id: info
run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT
- name: Download JAR and prepare artifacts
run: |
mkdir release
curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}"
mv compactcrafting-nightly.json release/compactcrafting-nightly.json
- name: Add Artifact
uses: actions/upload-artifact@v3
with:
name: release
path: release
release:
name: Release
needs: [ vars, get-package-info ]
runs-on: ubuntu-22.04
steps:
- name: Grab JAR and Info
uses: actions/download-artifact@v3
with:
name: release
path: .
- name: Read info into variable [latest]
id: info
run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT
- name: Create CurseForge Release
uses: itsmeow/curseforge-upload@master
with:
token: ${{ secrets.CF_API_TOKEN }}
project_id: ${{ needs.vars.outputs.cf_project }}
game_endpoint: minecraft
file_path: ${{ fromJson(steps.info.outputs.latestJson)[0].name}}
changelog: "This is a nightly build. It is not production-modpack ready and no support will be provided; it is intended for early testing and feedback."
changelog_type: markdown
game_versions: java:Java 17,Forge
release_type: alpha