Skip to content

Commit

Permalink
fix: v0.13.0-SNAPSHOT (#187)
Browse files Browse the repository at this point in the history
 * Separate publish and release workflow from gradle workflow.
 * Switch to `ncipollo/release-action@v1` for creating releases in publish workflow.
 * Update README.md with more information on platforms.
 * Reformat README.md.
 * annotations: Remove `Plugin.Platform`.
 * annotations: Rename `@PlatformDependeny` to `@Dependency`.
 * annotations: Fix bugs in generated main classes
 * Rewrite some Javadoc to make it easier to read.
 * Replace `PluginData` with `ChameleonPluginData` which has builders.
 * Rename plural packages to singular for consistency (users -> user, logging -> logger, etc.).
 * Add Preconditions to aid in checking states and validating arguments.
 * Rewrite Adventure mappers and audience reflection to adapt to Adventure changes and remove static use to avoid problems. (resolves #186)
 * Use `Collection` instead of `List` or `Set` in return types.
 * Add `EventSubscriber.Builder#filters(Collection)`.
 * Create `ServerEvent`.
 * Create `ConsoleUser`to represent platform consoles.
 * Add `Platform.<type>` constants, e.g. `Platform.BUKKIT -> "Bukkit"`.
 * Make PlatformTarget extend Predicate and a functional interface.
 * Add `PlatformTarget.<type>()` methods to match platforms by id, e.g. `PlatformTarget.bukkit()`.
 * Rename `ProxyUser#getServer()` to `ProxyUser#getConnectedServer()` for clarity.
 * Remove `User#chat(String)` and `User#chat(Component)` due to changes in Minecraft 1.19.1+.
 * Make `User` implement `net.kyori.adventure.identity.Identified`.
 * Rename `UserManager#getPlayers()` to `UserManager#getUsers()` for consistency.
 * Rename `UserManager#getPlayer(UUID)` to `UserManager#getUserById(UUID)` for consistency.
 * Add tests with 100% coverage for all Adventure mappers.
 * Add tests with 87% coverage for all Adventure audience reflection classes.
 * Improve format of `libs.versions.toml`.
 * Update adventure-platform to v4.2.0.
 * Update velocity-api to v3.3.1.
 * Update minestom to git:f291437ada.
 * Update annotations to v24.0.0.
 * Update errorprone to v2.18.0.
 * Update junit to v5.9.2.
 * Update nullaway to v0.10.8.
 * Improve nullaway configuration.
 * Add Codecov configuration and uploader.
 * Improve example project a little bit.
 * General reformatting and other improvements.
 * Bump version to `0.13.0-SNAPSHOT`.
  • Loading branch information
joshuasing authored Jan 16, 2023
1 parent fc4a37d commit ad0ab0b
Show file tree
Hide file tree
Showing 274 changed files with 10,337 additions and 4,952 deletions.
28 changes: 28 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
changelog:
exclude:
categories:
- title: "Breaking changes :warning:"
labels:
- "status: breaking"
- title: "Additions :sparkles:"
labels:
- "type: feature"
- "type: enhancement"
- title: "Bug fixes :bug:"
labels:
- "type: bug: fix"
- title: "Improvements :wrench:"
labels:
- "type: refactor"
- title: "Documentation :book:"
labels:
- "type: documentation"
- title: "Test coverage :test_tube:"
labels:
- "type: test"
- title: "Dependency updates"
labels:
- "type: dependencies"
- title: "Other"
labels:
- "*"
49 changes: 5 additions & 44 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,49 +70,10 @@ jobs:
**/build/reports/checkstyle/
**/build/reports/jacoco/
- name: "Perform CodeQL Analysis"
uses: github/codeql-action/analyze@v2

publish:
name: "Publish"
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
runs-on: "ubuntu-latest"
needs: "validate"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v3"

- name: "Set up JDK ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v3
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
java-version: "${{ env.JAVA_VERSION }}"
distribution: "adopt"

- name: "Determine version"
run: |
echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')" >> $GITHUB_ENV
- name: "Create release"
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ env.VERSION }}"
prerelease: "${{ endsWith(env.VERSION, 'SNAPSHOT') }}"
title: "Chameleon v${{ env.VERSION }}"

- name: "Import GPG key"
uses: crazy-max/[email protected]
with:
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
fail_ci_if_error: false

- name: "Publish"
uses: gradle/gradle-build-action@v2
with:
arguments: "publish"
env:
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
ORG_GRADLE_PROJECT_hyperaReleasesUsername: "${{ secrets.HYPERA_RELEASES_USERNAME }}"
ORG_GRADLE_PROJECT_hyperaReleasesPassword: "${{ secrets.HYPERA_RELEASES_PASSWORD }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsUsername: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsPassword: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
- name: "Perform CodeQL Analysis"
uses: github/codeql-action/analyze@v2
56 changes: 56 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Publish"
on:
push:
branches: [ "main" ]

concurrency:
group: "${{ github.workflow }}"
cancel-in-progress: true

env:
JAVA_VERSION: 18

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: actions/checkout@v3

- name: "Set up JDK ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v3
with:
java-version: "${{ env.JAVA_VERSION }}"
distribution: "adopt"

- name: "Determine version"
run: |
echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')" >> $GITHUB_ENV
- name: "Import GPG key"
uses: crazy-max/[email protected]
with:
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"

- name: "Gradle publish"
uses: gradle/gradle-build-action@v2
with:
arguments: "publish"
env:
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
ORG_GRADLE_PROJECT_hyperaReleasesUsername: "${{ secrets.HYPERA_RELEASES_USERNAME }}"
ORG_GRADLE_PROJECT_hyperaReleasesPassword: "${{ secrets.HYPERA_RELEASES_PASSWORD }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsUsername: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsPassword: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"

- name: "Create release"
uses: ncipollo/release-action@v1
with:
allowUpdates: true
updateOnlyUnreleased: true
generateReleaseNotes: true
name: "Chameleon v${{ env.VERSION }}"
prerelease: "${{ endsWith(env.VERSION, 'SNAPSHOT') }}"
tag: "${{ env.VERSION }}"
2 changes: 1 addition & 1 deletion .idea/copyright/MIT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ad0ab0b

Please sign in to comment.