mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
Add draft github release workflow
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
name: Draft Github Release
|
||||
on:
|
||||
# Enable manual run
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Tag to create (e.g. v0.4.0). Must include 'v' and must match pubspec"
|
||||
required: true
|
||||
default: "v0.4.0"
|
||||
type: string
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
draft-release:
|
||||
name: Draft Github release
|
||||
runs-on: ubuntu-latest
|
||||
needs: create-build
|
||||
steps:
|
||||
- name: Draft release with release notes
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
files: lichess-mobile.apk
|
||||
|
||||
create-build:
|
||||
name: Create android build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- name: Install Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
- run: flutter doctor -v
|
||||
|
||||
- name: Checkout mobile code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Code generation
|
||||
run: dart run build_runner build
|
||||
|
||||
- name: Configure Keystore
|
||||
run: |
|
||||
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
|
||||
echo "storeFile=upload-keystore.jks" >> key.properties
|
||||
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
|
||||
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
|
||||
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
|
||||
env:
|
||||
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
|
||||
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
|
||||
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
|
||||
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
|
||||
working-directory: android
|
||||
|
||||
- run: flutter build -v apk --release
|
||||
|
||||
- name: Rename build
|
||||
run: mv app-release.apk $GITHUB_WORKSPACE/lichess-mobile.apk
|
||||
working-directory: build/app/outputs/flutter-apk
|
||||
@@ -58,3 +58,11 @@ You can find more information about the `flutter run` command by running `flutte
|
||||
## Internationalisation
|
||||
|
||||
Don't edit the `app_en.arb` file by hand, this file is generated. More information [here](https://github.com/lichess-org/mobile/wiki/About-internationalisation).
|
||||
|
||||
## Releasing
|
||||
|
||||
Only for members of lichess team.
|
||||
|
||||
1. Bump the pubspec.yaml version number. This can be in a PR making a change or a separate PR. Use semantic versioning to determine which part to increment. The version number after the + should also be incremented. For example 0.3.3+000303 with a patch should become 0.3.4+000304.
|
||||
2. Run workflow [Draft GitHub Release](https://github.com/lichess-org/mobile/actions/workflows/draft_github_release.yml)
|
||||
3. Run workflow [Deploy to Play Store](https://github.com/lichess-org/mobile/actions/workflows/deploy_play_store.yml)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ description: Lichess mobile app V2
|
||||
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
version: 0.3.3+26
|
||||
version: 0.3.4+000304 # see README.md for details about versioning
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
||||
Reference in New Issue
Block a user