Skip to content

Commit

Permalink
chore: Let us revive the gamemode
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Dec 10, 2023
1 parent b2c06b9 commit 2ff77ad
Show file tree
Hide file tree
Showing 19 changed files with 400 additions and 261 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [ released ]

concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -19,28 +19,32 @@ jobs:

runs-on: ubuntu-latest

env:
ORG_GRADLE_PROJECT_omegaUsername: "${{ secrets.OMEGA_REPO_USERNAME }}"
ORG_GRADLE_PROJECT_omegaPassword: "${{ secrets.OMEGA_REPO_PASSWORD }}"

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
cache: 'gradle'

- name: Build Artifact
uses: gradle/gradle-build-action@v2
run: ./gradlew build

- name: Set up Artifact Upload
id: upload
run: echo "ARTIFACT_PATH=$(./gradlew getArtifactPath -q)" >> $GITHUB_ENV

- name: Upload Artifact to Actions
uses: actions/upload-artifact@v3
with:
cache-read-only: "${{ !startsWith(github.ref, 'refs/heads/master/') || github.event_name == 'pull_request' }}"
arguments: "build"
name: ${{ github.event.repository.name }}
path: ${{ env.ARTIFACT_PATH }}

- name: Determine Status
run: |
Expand All @@ -50,21 +54,26 @@ jobs:
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Set up Artifact Upload
id: upload
run: echo '::set-output name=ARTIFACT_PATH::'$(./gradlew getArtifactPath -q)

- name: Upload Artifact to Actions
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}
path: ${{ steps.upload.outputs.ARTIFACT_PATH }}

- name: Upload Artifact to Release
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
asset_name: ${{ github.event.repository.name }}.jar
file: ${{ steps.upload.outputs.ARTIFACT_PATH }}
file: ${{ env.ARTIFACT_PATH }}
tag: ${{ github.ref }}

- name: Update Changelog
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Commit Updated Changelog
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
3 changes: 3 additions & 0 deletions .spotless/project.importorder
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Project import order
0=
1=\#
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/),
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased] - yyyy-mm-dd


## [v0.4.0] - 2022-07-13

### Changes

- Allow admins to destroy source blocks


## [v0.3.1] - 2022-06-22

### Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Omega
Copyright (c) 2023 Xpdustry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 23 additions & 0 deletions LICENSE_HEADER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This file is part of $NAME. $DESCRIPTION

MIT License

Copyright (c) $YEAR $AUTHOR

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 12 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# TemplatePlugin
# rush

[![Jitpack latest version](https://jitpack.io/v/fr.xpdustry/TemplatePlugin.svg)](https://jitpack.io/#fr.xpdustry/TemplatePlugin)
[![Build status](https://github.com/Xpdustry/TemplatePlugin/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/Xpdustry/TemplatePlugin/actions/workflows/build.yml)
[![Mindustry 6.0 | 7.0 ](https://img.shields.io/badge/Mindustry-6.0%20%7C%207.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)
[![Build status](https://github.com/xpdustry/rush/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/Xpdustry/TemplatePlugin/actions/workflows/build.yml)
[![Mindustry 7.0 ](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)

## Description

Get your Mindustry plugin started with this awesome template repository, it features :
The rush plugin, IDK...

- [Jitpack](https://jitpack.io/) support.
## Installation

- GitHub actions for easier testing (the plugin is built for each commit and pull request).
This plugin requires :

- [Toxopid](https://plugins.gradle.org/plugin/fr.xpdustry.toxopid) gradle plugin for faster Mindustry development.
- Java 17 or above.

- [Indra](https://plugins.gradle.org/plugin/net.kyori.indra) gradle plugin for easier Java development.
- Mindustry v146 or above.

- [Distributor](https://github.com/xpdustry/distributor) v3.2.1.

- [Leaderboard](https://github.com/xpdustry/leaderboard).

## Building

Expand All @@ -27,29 +30,3 @@ Get your Mindustry plugin started with this awesome template repository, it feat
- `./gradlew runMindustryClient`: Run Mindustry in desktop with the plugin.

- `./gradlew runMindustryServer`: Run Mindustry in a server with the plugin.

## Running

This plugin is runs on Java 17 and is compatible with Mindustry V6 and V7.

## Nice tips

- When using this template, don't forget to :

- Change `plugin.json` and `gradle.properties`.

- Update `LiCENSE.md` with your name and/or replace it with your own license.

- Reset `CHANGELOG.md`.

- Don't forget to bump your dependencies with the `dependencyUpdates` task.

- Add the changes of your plugin in `CHANGELOG.md` as you develop.

- How to make a release in 3 steps :

1. Remove the `-SNAPSHOT` from your plugin version in `plugin.json`.

2. Create a release on GitHub (don't forget to add the changelog). The workflow will be triggered automatically.

3. Put back the `-SNAPSHOT` in your plugin version in `plugin.json`.
Loading

0 comments on commit 2ff77ad

Please sign in to comment.