#1899 (#1900) #514
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
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'}} |