Repository navigation
127 lines (108 loc) · 3.97 KB
/
Copy pathbuild-appshare.yml
File metadata and controls
127 lines (108 loc) · 3.97 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Build and Release CCloud
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to create release for (e.g., v1.0.0)'
required: true
default: 'v1.0.0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Make gradlew executable
run: |
chmod +x gradlew
- name: Make scripts executable
run: |
chmod +x scripts/*.sh
- name: Validate Gradle Wrapper
run: |
./scripts/verify-gradle-wrapper.sh
continue-on-error: true
timeout-minutes: 5
- name: Retry Gradle Wrapper Validation (if needed)
run: |
echo "Checking if Gradle wrapper validation is needed..."
# If the previous step failed, try a manual validation approach
if [ ! -f "gradle/wrapper/gradle-wrapper.jar.sha256" ]; then
echo "Gradle wrapper checksum missing, generating new one..."
./scripts/fix-gradle-wrapper.sh
else
echo "Gradle wrapper checksum already exists, continuing..."
fi
continue-on-error: true
- name: Check Gradle Wrapper Validation Result
run: |
if [ ! -f "gradle/wrapper/gradle-wrapper.jar.sha256" ]; then
echo "Gradle wrapper checksum missing, generating new one..."
cd gradle/wrapper
sha256sum gradle-wrapper.jar > gradle-wrapper.jar.sha256
fi
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
- name: Decode Keystore
run: |
echo "${{ secrets.KEY_STORE }}" | base64 --decode > app/keystore.jks
continue-on-error: true
- name: Create keystore properties file
run: |
echo "storePassword=${{ secrets.KEY_STORE_PASSWORD }}" > key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> key.properties
echo "storeFile=keystore.jks" >> key.properties
continue-on-error: true
- name: Build APK
run: |
./gradlew assembleRelease --stacktrace -x lint
- name: Rename APK
run: |
mkdir -p release
cp app/build/outputs/apk/release/app-universal-release.apk release/CCloud-universal.apk
- name: Get tag name
id: get_tag
run: |
if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then
TAG_NAME=${{ github.event.inputs.tag }}
else
TAG_NAME=${GITHUB_REF#refs/tags/}
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "Tag name: $TAG_NAME"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
files: |
release/CCloud-universal.apk
body: |
## CCloud Release ${{ env.TAG_NAME }}
### What's New
- Modernized UI with enhanced user experience
- Improved performance and stability
- New features and bug fixes
### Download Options
- [Universal APK (all architectures)](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/CCloud-universal.apk) - Compatible with all devices
### Installation
1. Download the appropriate APK file for your device
2. Enable "Install from unknown sources" in your device settings
3. Open and install the APK
4. Launch CCloud and enjoy your movies!