-
-
Notifications
You must be signed in to change notification settings - Fork 55
111 lines (107 loc) · 4.55 KB
/
build-development-jars-and-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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Build Beta Jars and Publish
on:
workflow_dispatch:
jobs:
build-publish-development:
runs-on: ubuntu-latest
concurrency:
group: build-publish-beta
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
- name: Get version
id: vars
run: |
version=$(cat version.txt)
run_number=${{ github.run_number }}
full_version="${version}-beta-${run_number}"
echo $full_version > version.txt
echo "version=$full_version" >> $GITHUB_OUTPUT
- name: Build Engine
uses: ./.github/actions/build-engine
# ----------------------------------------------------------------------------------------------------
- name: Test Extensions
uses: gradle/gradle-build-action@v2
with:
arguments: test clean --scan
build-root-directory: ./extensions
# ----------------------------------------------------------------------------------------------------
- name: Publish Engine to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./engine
- name: Publish All Extensions to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./extensions
- name: Publish Module-Plugin to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./module-plugin
# ----------------------------------------------------------------------------------------------------
# Has to be after the publish, because it needs to delete the slim jars and only keep the shadowed jars for the modrinth upload
- name: Build Extensions
uses: gradle/gradle-build-action@v2
with:
arguments: buildRelease --scan
build-root-directory: ./extensions
# ----------------------------------------------------------------------------------------------------
- name: Publish Modrinth
uses: Kir-Antipov/[email protected]
id: publish
with:
modrinth-id: "Vm7B3ymm"
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false
files: |
engine/engine-paper/build/libs/Typewriter.jar
extensions/**/build/libs/*.jar
name: "Typewriter v${{ steps.vars.outputs.version }} Build"
version: "${{ steps.vars.outputs.version }}"
version-type: "beta"
loaders: |
paper
game-versions: |
1.21.3
dependencies: |
packetevents
- name: Publish Hangar
uses: gradle/gradle-build-action@v2
continue-on-error: true
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
with:
arguments: engine-paper:publishPluginPublicationToHangar --scan
build-root-directory: ./engine
- name: Add Tag
uses: mathieudutour/[email protected]
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
custom_tag: "${{ steps.vars.outputs.version }}"
release_branches: develop
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
nodetail: true
title: Published Beta Build
description: |
I have published a beta build of Typewriter.
Version: ${{ steps.vars.outputs.version }}
[Download](https://modrinth.com/plugin/typewriter/version/${{ steps.publish.outputs.modrinth-version }})
- name: Notify Winston
uses: fjogeleit/http-request-action@v1
with:
url: 'https://winston-discord-bot.fly.dev/publishbeta'
method: 'GET'
customHeaders: '{"X-Signature": "${{ secrets.WINSTON_SIGNATURE }}"}'