Skip to content

Build Beta Jars and Publish #114

Build Beta Jars and Publish

Build Beta Jars and Publish #114

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 Plugin
uses: ./.github/actions/build-plugin
- name: Build Basic Adapter
uses: ./.github/actions/build-adapter
with:
adapter: BasicAdapter
- name: Build Citizens Adapter
uses: ./.github/actions/build-adapter
with:
adapter: CitizensAdapter
- name: Build CombatLogX Adapter
uses: ./.github/actions/build-adapter
with:
adapter: CombatLogXAdapter
- name: Build MythicMobs Adapter
uses: ./.github/actions/build-adapter
with:
adapter: MythicMobsAdapter
- name: Build EntityAdapter
uses: ./.github/actions/build-adapter
with:
adapter: EntityAdapter
- name: Build RPGRegions Adapter
uses: ./.github/actions/build-adapter
with:
adapter: RPGRegionsAdapter
- name: Build SuperiorSkyblock Adapter
uses: ./.github/actions/build-adapter
with:
adapter: SuperiorSkyblockAdapter
- name: Build Vault Adapter
uses: ./.github/actions/build-adapter
with:
adapter: VaultAdapter
- name: Build WorldGuard Adapter
uses: ./.github/actions/build-adapter
with:
adapter: WorldGuardAdapter
- name: Publish Modrinth
uses: Kir-Antipov/[email protected]
id: publish
with:
modrinth-id: "Vm7B3ymm"
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false
files: |
plugin/build/libs/typewriter.jar
adapters/**/build/libs/*.jar
name: "Typewriter v${{ steps.vars.outputs.version }} Development Build"
version: "${{ steps.vars.outputs.version }}"
version-type: "beta"
loaders: |
paper
purpur
game-versions: |
[1.21]
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: publishPluginPublicationToHangar --scan
build-root-directory: ./plugin
- name: Add Tag
uses: laputansoft/[email protected]
with:
github_token: ${{ env.github-token }}
default_bump: false
tag: "v${{ steps.vars.outputs.version }}"
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
nodetail: true
title: Published Development Build
description: |
I have published a development 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 }}"}'