Skip to content

Commit 3b684d9

Browse files
committed
Merge build-pre-release.yaml and build-debug.yaml
1 parent fb9ffa0 commit 3b684d9

File tree

3 files changed

+52
-196
lines changed

3 files changed

+52
-196
lines changed

.github/workflows/build-debug.yaml

Lines changed: 0 additions & 106 deletions
This file was deleted.

.github/workflows/build-pre-release.yaml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
19+
- uses: actions/setup-java@v4
20+
with:
21+
distribution: "temurin"
22+
java-version: 21
23+
- uses: gradle/actions/setup-gradle@v4
24+
- uses: actions/setup-go@v6
25+
with:
26+
go-version: "1.26"
27+
check-latest: true # Always check for the latest patch release
28+
- name: Update CA
29+
if: github.repository == 'MetaCubeX/ClashMetaForAndroid'
30+
run: |
31+
sudo apt-get update && sudo apt-get install ca-certificates
32+
sudo update-ca-certificates
33+
cp -f /etc/ssl/certs/ca-certificates.crt core/src/foss/golang/clash/component/ca/ca-certificates.crt
34+
- name: Write signing properties
35+
if: github.repository == 'MetaCubeX/ClashMetaForAndroid'
36+
env:
37+
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
38+
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
39+
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
40+
run: |
41+
touch signing.properties
42+
echo keystore.password="$SIGNING_STORE_PASSWORD" > signing.properties
43+
echo key.alias="$SIGNING_KEY_ALIAS" >> signing.properties
44+
echo key.password="$SIGNING_KEY_PASSWORD" >> signing.properties
45+
- name: Build
46+
run: ./gradlew app:assembleAlphaRelease
47+
- name: Delete release if exist then create release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: |
51+
gh release view Prerelease-alpha && gh release delete Prerelease-alpha -y --cleanup-tag
52+
gh release create Prerelease-alpha "./app/build/outputs/apk/alpha/release/"*.apk --generate-notes

0 commit comments

Comments
 (0)