feat(func)!: remove github action workflow
i don't need this, as i build locally Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
parent
8e0fd66a76
commit
121f290faf
4 changed files with 0 additions and 290 deletions
27
.github/workflows/crowdin.yml
vendored
27
.github/workflows/crowdin.yml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: Crowdin Action
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- app/src/main/res/values/strings.xml
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: crowdin action
|
||||
uses: crowdin/github-action@master
|
||||
with:
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
upload_sources: true
|
||||
config: 'crowdin.yml'
|
||||
crowdin_branch_name: master
|
||||
env:
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
|
||||
133
.github/workflows/issue.yml
vendored
133
.github/workflows/issue.yml
vendored
|
|
@ -1,133 +0,0 @@
|
|||
name: Issue check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 */15 * *"
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check title and version requirement
|
||||
if: github.event_name == 'issues'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let response = await github.rest.issues.listForRepo({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open'
|
||||
});
|
||||
let data = response['data'];
|
||||
data.forEach(function(issue){
|
||||
var title = issue['title'];
|
||||
var body = issue['body'];
|
||||
var labels = issue['labels'];
|
||||
var spam = false;
|
||||
var invalid = false;
|
||||
for(var i=0,l=labels.length;i<l;i++){
|
||||
if(labels[i]['name'] == 'bug'){
|
||||
if(title.substr(0, 5) !== '[Bug]' || title.trim() == '[Bug]' || title.toLowerCase().includes('hide root')){
|
||||
spam = true;
|
||||
}
|
||||
if(body.search("### Version requirement/版本要求\n\nPublic release/beta version/公开发布/测试版\n\n") != -1 || body.search("### Version requirement/版本要求\n\nOther/其他\n\n") != -1){
|
||||
invalid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(spam){
|
||||
var id = issue['number'];
|
||||
github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
labels: ["spam"]
|
||||
});
|
||||
}
|
||||
if(invalid){
|
||||
var id = issue['number'];
|
||||
github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
labels: ["invalid"]
|
||||
});
|
||||
}
|
||||
});
|
||||
- name: Close spam and invalid
|
||||
if: github.event_name == 'issues'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let response = await github.rest.issues.listForRepo({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open'
|
||||
});
|
||||
let data = response['data'];
|
||||
|
||||
data.forEach(function(issue){
|
||||
var labels = issue['labels'];
|
||||
var close = false;
|
||||
var lock = false;
|
||||
var rmbug = false;
|
||||
for(var i=0,l=labels.length;i<l;i++){
|
||||
if(labels[i]['name'] == 'invalid' || labels[i]['name'] == 'spam'){
|
||||
close = true;
|
||||
}
|
||||
if(labels[i]['name'] == 'spam'){
|
||||
lock = true;
|
||||
}
|
||||
if(labels[i]['name'] == 'bug'){
|
||||
rmbug = true;
|
||||
}
|
||||
}
|
||||
if(close){
|
||||
var id = issue['number'];
|
||||
github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
body: 'This issue has been marked as **spam** or **invalid**. For feedback please **follow the rules in the report form**, then open a new issue.'
|
||||
});
|
||||
if(rmbug){
|
||||
github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
name: 'bug'
|
||||
});
|
||||
}
|
||||
github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
state: 'closed'
|
||||
});
|
||||
}
|
||||
if(lock){
|
||||
var lid = issue['number'];
|
||||
github.rest.issues.lock({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: id,
|
||||
lock_reason: "spam"
|
||||
});
|
||||
}
|
||||
});
|
||||
- name: Close stale
|
||||
if: github.event_name != 'issues'
|
||||
uses: actions/stale@v9
|
||||
with:
|
||||
days-before-stale: 14
|
||||
stale-issue-label: stale
|
||||
stale-issue-message: It has not been updated for more than 14d. If there is no further update, this Issue will be closed.
|
||||
only-labels: bug
|
||||
days-before-close: 28
|
||||
close-issue-message: It has not been updated for 28 days, so it was automatically closed. Open a new Issue if necessary.
|
||||
|
||||
86
.github/workflows/main.yml
vendored
86
.github/workflows/main.yml
vendored
|
|
@ -1,86 +0,0 @@
|
|||
name: Main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
- '.github/workflows/issue.yml'
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Gradle wrapper validation
|
||||
uses: gradle/wrapper-validation-action@v3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Write key
|
||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
echo officialBuild=true >> local.properties
|
||||
echo buildWithGitSuffix=true >> local.properties
|
||||
echo storePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties
|
||||
echo keyAlias='${{ secrets.ALIAS }}' >> local.properties
|
||||
echo keyPassword='${{ secrets.ALIAS_KEY_PASSWORD }}' >> local.properties
|
||||
echo fileDir=`pwd`/key.jks >> local.properties
|
||||
echo "${{ secrets.KEY_STORE }}" | base64 --decode > key.jks
|
||||
|
||||
- name: Cache gradle
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
|
||||
- name: Gradle prebuild
|
||||
run: |
|
||||
./gradlew prebuild
|
||||
|
||||
- name: Build all
|
||||
id: buildAll
|
||||
run: |
|
||||
./gradlew assemble
|
||||
echo "releaseName=$(ls app/build/outputs/apk/release/*.apk | awk -F '(/|.apk)' '{print $5}')" >> $GITHUB_OUTPUT
|
||||
echo "debugName=$(ls app/build/outputs/apk/debug/*.apk | awk -F '(/|.apk)' '{print $5}')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload release
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.buildAll.outputs.releaseName }}
|
||||
path: "app/build/outputs/apk/release/*.apk"
|
||||
|
||||
- name: Upload debug
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.buildAll.outputs.debugName }}
|
||||
path: "app/build/outputs/apk/debug/*.apk"
|
||||
|
||||
- name: Upload mappings
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mappings
|
||||
path: "app/build/outputs/mapping/release"
|
||||
44
.github/workflows/pull_request.yml
vendored
44
.github/workflows/pull_request.yml
vendored
|
|
@ -1,44 +0,0 @@
|
|||
name: Pull Request
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }}
|
||||
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Gradle wrapper validation
|
||||
uses: gradle/wrapper-validation-action@v3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Write properties
|
||||
run: |
|
||||
echo buildWithGitSuffix=true >> local.properties
|
||||
|
||||
- name: Gradle prebuild
|
||||
run: |
|
||||
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||
./gradlew prebuild
|
||||
|
||||
- name: Build debug
|
||||
id: buildDebug
|
||||
run: |
|
||||
./gradlew :app:assembleDebug
|
||||
echo "debugName=$(ls app/build/apk/debug/HMA*-debug.apk | awk -F '(/|.apk)' '{print $6}')" >> $GITHUB_OUTPUT
|
||||
Reference in a new issue