This repository has been archived by the owner on May 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,056 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: publish | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
|
||
jobs: | ||
tag: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get release label of the pull request. | ||
uses: actions-ecosystem/action-release-label@v1 | ||
id: release-label | ||
|
||
- name: Cancel if the the p.r. does not have the release labels. | ||
if: ${{ steps.release-label.outputs.level == null }} | ||
run: exit 1 | ||
|
||
- name: Turnstyle | ||
uses: softprops/turnstyle@v1 | ||
with: | ||
poll-interval-seconds: 10 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Get Latest Release | ||
uses: pozetroninc/[email protected] | ||
id: version | ||
with: | ||
owner: spigotplugins | ||
repo: fakeplayer | ||
|
||
- name: Bump and return the new version. | ||
uses: actions-ecosystem/action-bump-semver@v1 | ||
id: bump-semver | ||
with: | ||
current_version: ${{ steps.version.outputs.release }} | ||
level: ${{ steps.release-label.outputs.level }} | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Publish with Maven | ||
run: | | ||
[[ "${{ steps.bump-semver.outputs.new_version }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1 | ||
mvn versions:set -DnewVersion="${{ steps.bump-semver.outputs.new_version }}" -ntp -B | ||
mvn install -Dgpg.skip=true -ntp -B | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.bump-semver.outputs.new_version }} | ||
tag: ${{ steps.bump-semver.outputs.new_version }} | ||
artifacts: "fakeplayer-plugin/target/FakePlayer.jar" |
Oops, something went wrong.