-
Notifications
You must be signed in to change notification settings - Fork 79
77 lines (75 loc) · 2.95 KB
/
release-dev.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Automated DEV Release
on:
push:
branches:
- "master"
- "release/**"
jobs:
release-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Download and install install4j
run: wget https://download-gcdn.ej-technologies.com/install4j/install4j_linux-x64_9_0_7.deb && sudo dpkg -i install4j_linux-x64_9_0_7.deb
- name: Build with Gradle
run: ./gradlew build makeAllmedias -x test
env:
INSTALL4J_HOME: /opt/install4j9
INSTALL4J_LICENSE: ${{ secrets.INSTALL4J_LICENSE }}
POEDITOR_APIKEY: ${{ secrets.POEDITOR_APIKEY }}
RUN_NUMBER: ${{ github.run_number }}
- name: Read version properties
id: read_version_properties
uses: christian-draeger/[email protected]
with:
path: 'version.properties'
properties: 'version shortVersion tag branch'
- name: Delete previous tag and release
uses: ClementTsang/[email protected]
with:
delete_release: true
tag_name: ${{ steps.read_version_properties.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Create a Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
files: |
build/artefacts/**
name: ${{ steps.read_version_properties.outputs.version }}
tag_name: ${{ steps.read_version_properties.outputs.tag }}
body_path: docs/md/release_notes.md
target_commitish: ${{ steps.read_version_properties.outputs.branch }}
prerelease: true
- name: If not dev-release delete previous short version tag
if: ${{ steps.read_version_properties.outputs.tag != 'dev'}}
uses: ClementTsang/[email protected]
with:
delete_release: true
tag_name: ${{ steps.read_version_properties.outputs.shortVersion }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: If not dev-release create a Release with short version tag
if: ${{ steps.read_version_properties.outputs.tag != 'dev'}}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
files: |
build/artefacts/**
name: ${{ steps.read_version_properties.outputs.version }}
tag_name: ${{ steps.read_version_properties.outputs.shortVersion }}
body_path: docs/md/release_notes.md
target_commitish: ${{ steps.read_version_properties.outputs.branch }}
prerelease: ${{ steps.read_version_properties.outputs.tag != 'tag_stable'}}