forked from medisant/AdvancedChatLog
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.22 KB
/
publish.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
on:
workflow_dispatch:
inputs:
previousVersion:
description: 'Previous Version (Do not include v prefix, must be same as the last version tag! Example: 1.4.1)'
required: true
version:
description: 'Version (Do not include v prefix! Example: 1.4.2)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Fetch tags
run: git fetch --tags
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Upload to websites
run: ./gradlew publishThirdParty --stacktrace -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}"
if: |
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
env:
modrinth_token: ${{ secrets.MODRINTH_TOKEN }}
github_token: ${{ secrets.GH_API_KEY }}
USERNAME: ${{ secrets.GH_USERNAME }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Capture build artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/