Skip to content

Commit

Permalink
ci: alpha workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Sep 28, 2024
1 parent 333e070 commit 8f95cb5
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 18 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish Alpha

on:
push:
branches:
- alpha

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
8
16
17
21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew build

- name: Publish to Modrinth/CurseForge
uses: Apehum/[email protected]
with:
name: 'pv-addon-replaymod'
split-releases: true
files-primary: build/libs/*.jar
version-resolver: 'exact'

changelog-file: client/changelog.md

modrinth-unfeature-mode: 'subset'
modrinth-id: 4iTfB0AP
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

version-type: alpha

- name: Publish to GitHub
uses: Apehum/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-generate-changelog: false

files-secondary: ""

changelog-file: changelog.md
17 changes: 7 additions & 10 deletions .github/workflows/prerelease-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
branches:
- v2.1
- v1.1

jobs:
build:
Expand All @@ -14,29 +14,26 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
8
16
17
21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
run: ./gradlew build

- name: Publish to GitHub
uses: Apehum/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-generate-changelog: true
github-prerelease: true

changelog-file: changelog.md
files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
files-secondary: ""
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Publish Release

on:
push:
Expand All @@ -14,9 +14,9 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
Expand All @@ -25,12 +25,13 @@ jobs:
17
21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
run: ./gradlew build

- name: Publish to Modrinth
- name: Publish to Modrinth/CurseForge
uses: Apehum/[email protected]
with:
name: 'pv-addon-replaymod'
Expand All @@ -50,7 +51,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-generate-changelog: false

files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
files-secondary: ""

changelog-file: changelog.md

0 comments on commit 8f95cb5

Please sign in to comment.