-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (77 loc) · 2.59 KB
/
autopublish.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
name: Automatically publish to Modrinth and CurseForge
on:
release:
types: [published]
jobs:
publish-to-curseforge:
if: github.repository_owner == 'yichifauzi'
runs-on: ubuntu-22.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: MC ${{ vars.MC_VERSION }} DBOP v${{ steps.download-files.outputs.tag_name }}
curseforge-id: 968954
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-files: "*.zip"
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
publish-to-modrinth:
if: github.repository_owner == 'yichifauzi'
runs-on: ubuntu-24.04
environment: github-actions
permissions:
id-token: write
attestations: write
contents: write
steps:
- name: Clone Repo
uses: actions/checkout@v4
- name: Download packwiz
uses: actions/download-artifact@v4
with:
name: "Linux 64-bit x86"
github-token: ${{ secrets.GH_PAT }}
repository: packwiz/packwiz
run-id: 11331794723
- name: Export to packwiz
run: |
chmod +x ./packwiz
pushd Packwiz/${{ vars.MC_VERSION }}
../../packwiz modrinth export -o ../../DBOP-${{ github.ref_name }}.mrpack
popd
- name: Attest mrpack
id: attest-mrpack
uses: actions/attest-build-provenance@v1
with:
subject-path: DBOP-${{ 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: MC ${{ vars.MC_VERSION }} DBOP v${{ github.ref_name }}
modrinth-id: olssWAmw
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: subset
files: DBOP-${{ github.ref_name }}.mrpack
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
- name: Upload to Github
uses: Shopify/[email protected]
with:
name: DBOP-${{ github.ref_name }}.mrpack
path: DBOP-${{ github.ref_name }}.mrpack
repo-token: ${{ secrets.GITHUB_TOKEN }}