-
-
Notifications
You must be signed in to change notification settings - Fork 17
51 lines (50 loc) · 1.68 KB
/
depoy_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This file will result in a new townyflight release version being deployed.
name: Deploy Release
on:
workflow_dispatch:
env:
CURR_VER: 0.0.0
SUPPORTED: " for Towny "
TOWNY_VER: 0.0.0.0
jobs:
deploy_release_as_draft:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17']
name: Creating TownyFlight Release
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: set up eclipse temurin
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-package: jdk
cache: 'maven'
- name: compile townyflight with maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B clean package
- name: find current version
run: |
export POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "CURR_VER=$POM_VERSION" >> $GITHUB_ENV
- name: find towny dependency version
run: |
export DEP_VERSION=$(mvn help:evaluate -Dexpression=towny.version -q -DforceStdout)
echo "TOWNY_VER=$DEP_VERSION" >> $GITHUB_ENV
- name: create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
draft: false
prerelease: false
token: ${{ github.token }}
tag_name: ${{ env.CURR_VER }}
name: ${{ env.CURR_VER }}${{ env.SUPPORTED }}${{ env.TOWNY_VER }}+
files: |
./target/TownyFlight-${{ env.CURR_VER }}.jar
env:
GITHUB_REPOSITORY: my_gh_org/my_gh_repo