-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
16 additions
and
32 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 |
---|---|---|
|
@@ -21,7 +21,6 @@ jobs: | |
- name: "Get version" | ||
id: metadata | ||
run: | | ||
echo "NEW_VERSION=$(php -r 'echo (version_compare(yaml_parse_file(getcwd() . "/src/main/resources/plugin.yml")["version"], file_get_contents(__DIR__ + "/version-nukkit.txt"), ">") ? "y" : "n");')" >> $GITHUB_OUTPUT | ||
echo "VERSION=$(php -r 'echo explode("+", explode("-", yaml_parse_file(getcwd() . "/src/main/resources/plugin.yml")["version"])[0])[0];')" >> $GITHUB_OUTPUT | ||
echo "FULL_VERSION=$(php -r 'echo yaml_parse_file(getcwd() . "/src/main/resources/plugin.yml")["version"];')" >> $GITHUB_OUTPUT | ||
echo "NAME=$(php -r 'echo yaml_parse_file(getcwd() . "/src/main/resources/plugin.yml")["name"];')" >> $GITHUB_OUTPUT | ||
|
@@ -51,39 +50,14 @@ jobs: | |
automatic_release_tag: "v${{ steps.metadata.outputs.VERSION }}" | ||
prerelease: false | ||
title: "Release v${{ steps.metadata.outputs.VERSION }}" | ||
files: "target/**.jar" | ||
files: "target/Presence-Man-Nukkit.jar" | ||
|
||
- name: "Create version-nukkit.txt" | ||
if: "${{ steps.metadata.outputs.NEW_VERSION }} === 'y'" | ||
run: "echo \"${{ steps.metadata.outputs.VERSION }}\" > version-nukkit.txt" | ||
- name: "Create latest_version.txt" | ||
run: "echo \"${{ steps.metadata.outputs.VERSION }}\" > latest_version.txt" | ||
|
||
- name: "Update version.txt" | ||
- name: "Update latest_version.txt" | ||
uses: "test-room-7/action-update-file@v1" | ||
if: "${{ steps.metadata.outputs.NEW_VERSION }} === 'y'" | ||
with: | ||
file-path: version-nukkit.txt | ||
commit-msg: Updated version - ci ignore | ||
file-path: latest_version.txt | ||
commit-msg: "Updated latest version to ${{ steps.metadata.outputs.VERSION }} - ci ignore" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
committer-name: "xxAROX" | ||
committer-email: "[email protected]" | ||
|
||
#- name: "Pushes latest version-nukkit.txt file" | ||
# uses: dmnemec/copy_file_to_another_repo_action@main | ||
# env: | ||
# API_TOKEN_GITHUB: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
# with: | ||
# source_file: 'version-nukkit.txt' | ||
# destination_repo: 'Presence-Man/releases' | ||
# destination_folder: '' | ||
# user_email: '[email protected]' | ||
# user_name: 'xxAROX' | ||
# commit_message: 'Updated "Nukkit Client" version' | ||
|
||
#- name: Release to public | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# tag_name: "latest" | ||
# name: "Latest releases" | ||
# repository: "Presence-Man/releases" | ||
# token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
# files: "target/Presence-Man-Nukkit.jar" |
File renamed without changes.