-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.96 KB
/
publish-snapshot.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
name: publish-snapshot
on:
push:
branches:
- '**'
jobs:
publish-snapshot:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
loader: [common, fabric, forge, neoforge]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
- name: Make gradle wrapper executable
run: chmod +x ./gradlew
- name: Extracting API version from properties
shell: bash
run: echo "version=$(cat kuma-api/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT
id: extract-api-version
- name: Extracting version from properties
shell: bash
run: echo "version=$(cat kuma/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT
id: extract-version
- name: Bumping API version
uses: TwelveIterationMods/bump-version@v1
with:
version: ${{ steps.extract-api-version.outputs.version }}
bump: patch
id: bump-api-version
- name: Bumping version
uses: TwelveIterationMods/bump-version@v1
with:
version: ${{ steps.extract-version.outputs.version }}
bump: minor
id: bump-version
- name: Publish API
run: ./gradlew :kuma-api:${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-api-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}'
- name: Publish
run: ./gradlew :kuma:${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}'