-
-
Notifications
You must be signed in to change notification settings - Fork 89
83 lines (81 loc) · 2.84 KB
/
auto-publish.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
name: Automatically publish to Modrinth and CurseForge
on:
release:
types: [published]
jobs:
publish-to-curseforge:
if: github.repository_owner == 'Fabulously-Optimized'
runs-on: ubuntu-24.04
environment: github-actions
steps:
- name: Download pack files
uses: robinraju/[email protected]
id: download-files
with:
fileName: "*.zip"
latest: true
tarBall: false
zipBall: false
preRelease: true
- name: Publish to CurseForge
uses: Kir-Antipov/[email protected]
with:
name: ${{ steps.download-files.outputs.tag_name }} for ${{ vars.MC_VERSION }}
curseforge-id: 396246
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-files: '*.zip'
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
publish-to-modrinth:
if: github.repository_owner == 'Fabulously-Optimized'
runs-on: ubuntu-24.04
environment: github-actions
permissions:
id-token: write
attestations: write
contents: write
steps:
- name: Clone Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Download packwiz
uses: actions/download-artifact@v4
with:
name: "Linux 64-bit x86"
github-token: ${{ secrets.GH_PAT }}
repository: Madis0/packwiz
run-id: 12104671023
- name: Export to packwiz
run: |
chmod +x ./packwiz
pushd Packwiz/${{ vars.MC_VERSION }}
../../packwiz modrinth export -o ../../Fabulously.Optimized-${{ github.ref_name }}.mrpack
popd
- name: Attest mrpack
id: attest-mrpack
uses: actions/attest-build-provenance@v1
with:
subject-path: Fabulously.Optimized-${{ github.ref_name }}.mrpack
- name: Copy and zip attestation
run: |
cp ${{ steps.attest-mrpack.outputs.bundle-path }} cosign-bundle.json
zip cosign-bundle.zip cosign-bundle.json
- name: Publish to Modrinth
uses: Kir-Antipov/[email protected]
with:
name: ${{ github.ref_name }} for ${{ vars.MC_VERSION }}
modrinth-id: 1KVo5zza
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: subset
files: |
Fabulously.Optimized-${{ github.ref_name }}.mrpack
cosign-bundle.zip
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
- name: Upload to Github
uses: Shopify/[email protected]
with:
name: Fabulously.Optimized-${{ github.ref_name }}.mrpack
path: Fabulously.Optimized-${{ github.ref_name }}.mrpack
repo-token: ${{ secrets.GITHUB_TOKEN }}