Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Jan 17, 2024
1 parent 5e281dc commit 8c881b5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/check_alist.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

GIT_REPO="https://github.com/alist-org/alist.git"

function to_int() {
echo $(echo "$1" | grep -oE '[0-9]+' | tr -d '\n')
}

function get_latest_version() {
echo $(curl -s https://api.github.com/repos/alist-org/alist/releases/latest | grep -o '"tag_name": ".*"' | cut -d'"' -f4)
echo $(git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags $GIT_REPO | tail --lines=1 | cut --delimiter='/' --fields=3)
}

LATEST_VER=""
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: 1.21.5
cache-dependency-path: ${{ github.workspace }}/alist-lib/go.sum
cache-dependency-path: ${{ github.workspace }}/alist-lib/alist/go.sum

- name: Build
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: 1.21.5
cache-dependency-path: ${{ github.workspace }}/alist-lib/go.sum
cache-dependency-path: ${{ github.workspace }}/alist-lib/alist/go.sum

- name: Build
run: |
cd $GITHUB_WORKSPACE/alist-lib
GOARCH=${{ matrix.GO_ARCH }}
declare -A goarch2cc=( ["arm64"]="aarch64-linux-android32-clang" ["arm"]="armv7a-linux-androideabi32-clang" ["amd64"]="x86_64-linux-android32-clang" ["386"]="i686-linux-android32-clang")
Expand All @@ -41,7 +39,8 @@ jobs:
declare -A arch2lib=( ["arm64"]="arm64-v8a" ["arm"]="armeabi-v7a" ["amd64"]="x86_64" ["386"]="x86")
export LIB="${arch2lib[$GOARCH]}"
./scripts/install_alist.sh $GOARCH $LIB
cd $GITHUB_WORKSPACE/alist-lib/scripts
./install_alist.sh $GOARCH $LIB
- name: Upload to Artifact
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_alist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CheckAList

on:
schedule:
- cron: "0 * * * *" # 每小时执行一次
- cron: "0 5,17 * * *" # 每日5点和17点执行
workflow_dispatch:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release
ui

0 comments on commit 8c881b5

Please sign in to comment.