Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
Signed-off-by: Asutorufa <16442314+Asutorufa@users.noreply.github.com>
  • Loading branch information
Asutorufa committed May 1, 2024
1 parent df023cb commit e47eeca
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ jobs:
fetch-tags: "true"
submodules: "recursive"

- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: get run id
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GITHUB_RUN_ID=$(gh run list -w Go -L 1 -R yuhaiin/yuhaiin -s success --json databaseId -q .[0].databaseId)" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v5
- uses: actions/download-artifact@v4
with:
check-latest: true
go-version-file: "yuhaiin/code/go.mod"
cache-dependency-path: "yuhaiin/code/go.sum"
name: yuhaiin.aar
path: yuhaiin
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: yuhaiin/yuhaiin
run-id: ${{ env.GITHUB_RUN_ID }}

- name: set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -37,21 +38,6 @@ jobs:
distribution: "temurin"
cache: gradle

- name: front and rule
run: |
cd yuhaiin/code
git clone --depth=1 https://github.com/yuhaiin/yuhaiin.github.io.git internal/http/out
rm -rf internal/http/out/.git internal/http/out/.nojekyll
go generate internal/http/generate.go
curl https://raw.githubusercontent.com/yuhaiin/yuhaiin/ACL/yuhaiin/yuhaiin.conf -o internal/statics/bypass.conf
go generate internal/statics/generate.go
- name: build yuhaiin aar
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
sh yuhaiin/build.sh
- name: Build with Gradle
env:
KEYSTORE_PATH: ${{ github.workspace }}/release.keystore
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.4.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion yuhaiin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export PATH=$PATH:"${HOME}/.local/share/JetBrains/Toolbox/apps/android-studio/jb

set -x && \
cd "${current}"/code && \
gomobile bind -ldflags='-s -w -buildid=' -tags="page" -trimpath -target="android/arm64,android/amd64" -androidapi 21 -o "${current}"/yuhaiin.aar -v ./cmd/android/
gomobile bind -ldflags='-s -w -buildid=' -trimpath -target="android/arm64,android/amd64" -androidapi 21 -o "${current}"/yuhaiin.aar -v ./cmd/android/
1 change: 0 additions & 1 deletion yuhaiin/code
Submodule code deleted from f2117d

0 comments on commit e47eeca

Please sign in to comment.