Increase version to v2.2.1.0-BETA #10
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Create Release | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Generate changelog | |
id: changelog | |
uses: metcalfc/changelog-generator@v0.4.3 | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
# Step that caches and restores maven dependencies | |
- name: Cache maven dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install Dependencies | |
run: sudo apt-get install -y genisoimage | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Get Maven version | |
run: echo "::set-env name=VERSION::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
Changes in this Release: | |
${{ steps.changelog.outputs.changelog }} | |
draft: true | |
prerelease: false | |
- name: Upload Server Jar | |
id: upload-server-jar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: server/target/server-${{ env.VERSION }}.jar | |
asset_name: server-${{ env.VERSION }}.jar | |
asset_content_type: application/jar | |
- name: Upload Editor Jar | |
id: upload-editor-jar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: editor/target/editor-${{ env.VERSION }}.jar | |
asset_name: editor-${{ env.VERSION }}.jar | |
asset_content_type: application/jar | |
- name: Upload Client Jar | |
id: upload-client-jar | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: client/target/client-${{ env.VERSION }}.jar | |
asset_name: client-${{ env.VERSION }}.jar | |
asset_content_type: application/jar | |
- name: Upload Client exe | |
id: upload-client-exe | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: client/target/client-${{ env.VERSION }}.exe | |
asset_name: client-${{ env.VERSION }}.exe | |
asset_content_type: application/exe | |
- name: Upload Client dmg | |
id: upload-client-dmg | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: client/target/client-${{ env.VERSION }}.dmg | |
asset_name: client-${{ env.VERSION }}.dmg | |
asset_content_type: application/octet-stream |