Release #23
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version_name: | |
description: 'The version name to release. E.g. 24.12.31' | |
required: true | |
default: null | |
version_code: | |
description: 'The version code (numeric) to release. E.g. 241231' | |
required: true | |
default: null | |
schedule: | |
- cron: "0 0 1,8,15,22 * *" # 1st, 8th, 15th, and 22nd of the month | |
jobs: | |
empower-plant-release: | |
runs-on: macos-13 | |
name: 'Release a new Android Empower Plant version' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Java Version | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Automatic Version Name And Code | |
if: inputs.version_name == null | |
run: | | |
echo "VERSION_NAME=$(date +'%y.%m.%d')" >> $GITHUB_ENV | |
echo "VERSION_CODE=$(date +'%y%m%d')" >> $GITHUB_ENV | |
shell: sh | |
- name: Run Deploy Script (manual version) | |
if: inputs.version_name != null | |
run: ./deploy_project.sh ${{ inputs.version_name }} | |
shell: sh | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
VERSION_NAME: ${{ inputs.version_name }} | |
VERSION_CODE: ${{ inputs.version_code }} | |
- name: Run Deploy Script (automatic version) | |
if: inputs.version_name == null | |
run: ./deploy_project.sh "$(date +'%y.%m.%d')" | |
shell: sh | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |