Skip to content

Release v1.0.0

Release v1.0.0 #2

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Release
on: [ push ]
jobs:
build:
if: startsWith(github.event.head_commit.message, 'Release ')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt-hotspot
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: "Get data"
id: metadata
run: |
echo ::set-output name=VERSION::$(php -r 'echo explode("+", explode("-", yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "src/main/resources/plugin.yml")["version"])[0])[0];')
echo ::set-output name=FULL_VERSION::$(php -r 'echo yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "src/main/resources/plugin.yml")["version"];')
echo ::set-output name=NAME::$(php -r 'echo yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "src/main/resources/plugin.yml")["name"];')
- name: Upload release
if: github.ref == 'refs/heads/master'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.metadata.outputs.VERSION }}"
prerelease: false
title: "Release v${{ steps.metadata.outputs.VERSION }}"
files: |
target/TransferAPI-Nukkit-1.0-SNAPSHOT.jar