8000 Migrate to GitHub Actions by cbeuw · Pull Request #40 · cbeuw/Cloak-android · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Migrate to GitHub Actions #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release APK

on: push

permissions:
id-token: write
attestations: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: '1.22'

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r26d
link-to-sdk: true

- name: Compile Go libs
run: |
pushd 'app/src'
./make.sh
popd

- name: Build with Gradle
run: ./gradlew --no-daemon assembleRelease

- name: Sign APK
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
alias: ${{ secrets.ALIAS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"

- name: Attest APK
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{steps.sign_app.outputs.signedReleaseFile}}

- name: Upload release files
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{steps.sign_app.outputs.signedReleaseFile}}

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Shadowsocks plugin Cloak for Android

## Requirements

- Go 1.15
- Android NDK 21.3.6528147
- Android SDK 29
- Gradle 6.1.1
- Go 1.22
- Android NDK 26.3.11579264
- Android SDK 34
- Gradle 7.4

## Build Instructions

Expand Down
6 changes: 4 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ apply plugin: 'kotlin-android-extensions'


android {
compileSdkVersion 29
compileSdk 34
buildToolsVersion "34.0.0"
ndkVersion "21.3.6528147"
defaultConfig {
applicationId "com.github.shadowsocks.plugin.ck_client"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 34
versionCode 22
versionName '2.9.0'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -22,6 +23,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'com.github.shadowsocks.plugin.ck_client'
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "ck-client-${defaultConfig.versionName}.apk"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.github.shadowsocks.plugin.ck_client">
xmlns:tools="http://schemas.android.com/tools">

<application
tools:replace="android:theme"
Expand Down Expand Up @@ -32,7 +31,8 @@
android:name="com.github.shadowsocks.plugin.default_config"
android:value="" />
</provider>
<activity android:name="com.github.shadowsocks.plugin.ck_client.ConfigActivity">
<activity android:name="com.github.shadowsocks.plugin.ck_client.ConfigActivity"
android:exported="true">
<intent-filter>
<action android:name="com.github.shadowsocks.plugin.ACTION_CONFIGURE" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
71 changes: 0 additions & 71 deletions azure-pipelines.yml

This file was deleted.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.72'
ext.kotlin_version = '1.6.21'
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
12 changes: 6 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Apr 17 15:34:59 BST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
#Sat Jun 29 18:03:17 BST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
0