|
1 | 1 | name: Release |
2 | 2 |
|
| 3 | +# TODO: trigger this via Jenkins somehow? |
| 4 | + |
3 | 5 | on: |
4 | 6 | workflow_dispatch: |
5 | 7 | inputs: |
6 | | - publish-curseforge: |
7 | | - description: Publish to CurseForge |
8 | | - type: boolean |
9 | | - default: false |
10 | | - publish-modrinth: |
11 | | - description: Publish to Modrinth |
12 | | - type: boolean |
13 | | - default: false |
14 | | - publish-github: |
15 | | - description: Publish to GitHub |
16 | | - type: boolean |
17 | | - default: false |
18 | 8 | publish-docs: |
19 | 9 | description: Publish the web book |
20 | 10 | type: boolean |
|
43 | 33 | deploy-pages: ${{ inputs.publish-docs && !inputs.dry-run }} |
44 | 34 | release: true |
45 | 35 |
|
46 | | - publish-mod: |
47 | | - needs: build-docs |
48 | | - if: inputs.publish-curseforge || inputs.publish-modrinth || inputs.publish-github |
49 | | - runs-on: ubuntu-latest |
50 | | - environment: |
51 | | - name: curseforge-modrinth |
52 | | - permissions: |
53 | | - contents: write |
54 | | - steps: |
55 | | - - uses: actions/checkout@v4 |
56 | | - - uses: actions/setup-java@v4 |
57 | | - with: |
58 | | - distribution: temurin |
59 | | - java-version: 17 |
60 | | - - uses: gradle/actions/setup-gradle@v3 |
61 | | - |
62 | | - - name: Build mod |
63 | | - run: ./gradlew build |
64 | | - |
65 | | - # do this first so we fail if we've already published this version |
66 | | - # because CurseForge and Modrinth apparently don't care! |
67 | | - - name: Publish to GitHub |
68 | | - if: inputs.publish-github |
69 | | - env: |
70 | | - DRY_RUN: ${{ inputs.dry-run && 'true' || '' }} |
71 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
72 | | - run: ./gradlew publishGithub |
73 | | - |
74 | | - - name: Publish to CurseForge |
75 | | - if: inputs.publish-curseforge |
76 | | - env: |
77 | | - DRY_RUN: ${{ inputs.dry-run && 'true' || '' }} |
78 | | - CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} |
79 | | - run: ./gradlew publishCurseforge |
80 | | - |
81 | | - - name: Publish to Modrinth |
82 | | - if: inputs.publish-modrinth |
83 | | - env: |
84 | | - DRY_RUN: ${{ inputs.dry-run && 'true' || '' }} |
85 | | - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} |
86 | | - run: ./gradlew publishModrinth |
87 | | - |
88 | | - - name: Upload dry run artifact |
89 | | - if: inputs.dry-run |
90 | | - uses: actions/upload-artifact@v4 |
91 | | - with: |
92 | | - name: mod-publish |
93 | | - path: '*/build/publishMods' |
94 | | - if-no-files-found: error |
95 | | - |
96 | 36 | publish-docs: |
97 | 37 | needs: build-docs |
98 | 38 | if: inputs.publish-docs && !inputs.dry-run |
|
0 commit comments