Skip to content
Closed
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
103 changes: 6 additions & 97 deletions .github/workflows/beta_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,96 +13,20 @@ permissions:
contents: write

jobs:
changelog:
name: Beta Release Changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0

- name: Create or update ref
id: create-or-update-ref
uses: ovsds/create-or-update-ref-action@1157b2991820188d5a8e6f22656775d1d171f762 # v1
with:
ref: tags/beta
sha: ${{ github.sha }}

- name: Delete beta tag
run: git tag -d beta
continue-on-error: true

- name: changelog # or changelogithub@0.12 if ensure the stable result
id: changelog
run: |
git tag -l
npx changelogithub --output CHANGELOG.md

- name: Upload assets to beta release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! gh release view beta; then
gh release create beta --prerelease --notes-file CHANGELOG.md
else
gh release edit beta --prerelease --notes-file CHANGELOG.md
fi
gh release upload beta "CHANGELOG.md" --clobber

- name: Upload assets to github artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: beta changelog
path: ${{ github.workspace }}/CHANGELOG.md
compression-level: 0
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

release:
needs:
- changelog
strategy:
matrix:
include:
- target: "!(*musl*|*windows-arm64*|*windows7-*|*android*|*freebsd*)" # xgo and loongarch (exclude mips64le)
hash: "md5"
flags: ""
goflags: ""
- target: "linux-(mips|mips64|mipsle|mips64le|loong64)-musl*" # musl-compat-family
hash: "md5-linux-musl-mips"
flags: "-ldflags=-linkmode external -extldflags '-static -fpic'"
goflags: ""
musl_static: "true"
- target: "linux-!(arm*|mips|mips64|mipsle|mips64le|loong64)-musl*" # musl-not-arm (exclude compat-family)
hash: "md5-linux-musl"
flags: "-ldflags=-linkmode external -extldflags '-static -fpic'"
goflags: ""
musl_static: "true"
- target: "linux-arm*-musl*" #musl-arm
hash: "md5-linux-musl-arm"
flags: "-ldflags=-linkmode external -extldflags '-static -fpic'"
goflags: ""
musl_static: "true"
- target: "windows-arm64" #win-arm64
- target: "windows-arm64" # win-arm64
hash: "md5-windows-arm64"
flags: ""
goflags: ""
musl_static: "false"
- target: "windows7-*" #win7
- target: "windows7-*" # win7
hash: "md5-windows7"
flags: ""
goflags: "-tags=sqlite_cgo_compat"
musl_static: "false"
- target: "android-*" #android
hash: "md5-android"
flags: ""
goflags: ""
musl_static: "false"
- target: "freebsd-*" #freebsd
hash: "md5-freebsd"
flags: ""
goflags: ""
musl_static: "false"

name: Beta Release
runs-on: ubuntu-latest
Expand Down Expand Up @@ -143,24 +67,6 @@ jobs:
env:
GOFLAGS: ${{ matrix.goflags }}

- name: Verify musl binaries are static
if: matrix.musl_static == 'true'
run: |
set -e
shopt -s nullglob
files=(build/openlist-*-musl-*)
if [ ${#files[@]} -eq 0 ]; then
echo "No musl binaries found"
exit 1
fi
for f in "${files[@]}"; do
if readelf -l "$f" | grep -q "Requesting program interpreter"; then
echo "Dynamic binary detected: $f"
readelf -l "$f" | grep "Requesting program interpreter" || true
exit 1
fi
done

- name: Compress
run: |
bash build.sh zip ${{ matrix.hash }}
Expand All @@ -171,6 +77,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! gh release view beta; then
gh release create beta --prerelease --title "Beta" --notes "Beta release"
fi
for file in build/compress/*; do
gh release upload beta "$file" --clobber
done
Expand All @@ -190,4 +99,4 @@ jobs:
name: beta builds for ${{ env.cleaned_target }}
path: ${{ github.workspace }}/build/compress/*
compression-level: 0
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if-no-files-found: error
2 changes: 1 addition & 1 deletion drivers/local/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (d *Local) getThumb(ctx context.Context, file model.Obj) (*bytes.Buffer, *s
if err != nil {
return nil, nil, err
}
thumbImg := imaging.Resize(image, 144, 0, imaging.Lanczos)
thumbImg := imaging.Resize(image, 540, 0, imaging.Lanczos)
var buf bytes.Buffer
err = imaging.Encode(&buf, thumbImg, imaging.PNG)
if err != nil {
Expand Down
Loading