|
1 | | -name: Release tagged build |
| 1 | +name: Release Tags |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | tags: |
6 | 6 | - '*' |
7 | 7 |
|
8 | | -jobs: |
9 | | - build: |
10 | | - runs-on: ubuntu-latest |
11 | | - steps: |
12 | | - - uses: actions/checkout@v4 |
13 | | - with: |
14 | | - fetch-depth: 0 |
15 | | - |
16 | | - - name: Set release version |
17 | | - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
18 | | - |
19 | | - - name: Set up JDK 21 |
20 | | - uses: actions/setup-java@v4 |
21 | | - with: |
22 | | - java-version: '21' |
23 | | - distribution: 'adopt' |
24 | | - cache: gradle |
| 8 | +permissions: |
| 9 | + contents: write |
25 | 10 |
|
26 | | - - name: Grant execute permission for gradlew |
27 | | - run: chmod +x gradlew |
28 | | - |
29 | | - - name: Setup the workspace |
30 | | - run: ./gradlew setupCIWorkspace |
31 | | - |
32 | | - - name: Build and publish to Maven, Modrinth, and CurseForge |
33 | | - run: ./gradlew build publish |
34 | | - env: |
35 | | - MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }} |
36 | | - MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }} |
37 | | - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} |
38 | | - CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} |
| 11 | +jobs: |
| 12 | + release-tags: |
| 13 | + uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags.yml@master |
| 14 | + with: |
| 15 | + workspace: "setupCIWorkspace" |
| 16 | + secrets: |
| 17 | + MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }} |
| 18 | + MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }} |
| 19 | + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} |
| 20 | + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} |
39 | 21 |
|
40 | | - - name: Release under current tag |
41 | | - uses: "marvinpinto/action-automatic-releases@latest" |
42 | | - with: |
43 | | - repo_token: "${{ secrets.GITHUB_TOKEN }}" |
44 | | - automatic_release_tag: "${{ env.RELEASE_VERSION }}" |
45 | | - prerelease: false |
46 | | - title: "${{ env.RELEASE_VERSION }}" |
47 | | - files: build/libs/*.jar |
0 commit comments