mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
fix(build): version lost
This commit is contained in:
30
.github/workflows/beta_release.yml
vendored
30
.github/workflows/beta_release.yml
vendored
@ -2,7 +2,7 @@ name: Beta Release builds
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ 'main' ]
|
branches: ["main"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@ -16,8 +16,8 @@ jobs:
|
|||||||
changelog:
|
changelog:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ ubuntu-latest ]
|
platform: [ubuntu-latest]
|
||||||
go-version: [ '1.21' ]
|
go-version: ["1.21"]
|
||||||
name: Beta Release Changelog
|
name: Beta Release Changelog
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@ -65,17 +65,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: '!(*musl*|*windows-arm64*|*android*|*freebsd*)' # xgo
|
- target: "!(*musl*|*windows-arm64*|*android*|*freebsd*)" # xgo
|
||||||
hash: "md5"
|
hash: "md5"
|
||||||
- target: 'linux-!(arm*)-musl*' #musl-not-arm
|
- target: "linux-!(arm*)-musl*" #musl-not-arm
|
||||||
hash: "md5-linux-musl"
|
hash: "md5-linux-musl"
|
||||||
- target: 'linux-arm*-musl*' #musl-arm
|
- target: "linux-arm*-musl*" #musl-arm
|
||||||
hash: "md5-linux-musl-arm"
|
hash: "md5-linux-musl-arm"
|
||||||
- target: 'windows-arm64' #win-arm64
|
- target: "windows-arm64" #win-arm64
|
||||||
hash: "md5-windows-arm64"
|
hash: "md5-windows-arm64"
|
||||||
- target: 'android-*' #android
|
- target: "android-*" #android
|
||||||
hash: "md5-android"
|
hash: "md5-android"
|
||||||
- target: 'freebsd-*' #freebsd
|
- target: "freebsd-*" #freebsd
|
||||||
hash: "md5-freebsd"
|
hash: "md5-freebsd"
|
||||||
|
|
||||||
name: Beta Release
|
name: Beta Release
|
||||||
@ -89,7 +89,7 @@ jobs:
|
|||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: "1.22"
|
||||||
|
|
||||||
- name: Setup web
|
- name: Setup web
|
||||||
run: bash build.sh dev web
|
run: bash build.sh dev web
|
||||||
@ -105,11 +105,11 @@ jobs:
|
|||||||
output: openlist-$target$ext
|
output: openlist-$target$ext
|
||||||
musl-base-url: "https://github.com/OpenListTeam/musl-compilers/releases/latest/download/"
|
musl-base-url: "https://github.com/OpenListTeam/musl-compilers/releases/latest/download/"
|
||||||
x-flags: |
|
x-flags: |
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$built_at
|
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$built_at
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=OpenList
|
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=OpenList
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$git_commit
|
github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$git_commit
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.Version=$tag
|
github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$tag
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.WebVersion=dev
|
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=dev
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
|
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@ -2,9 +2,9 @@ name: Test Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ 'main' ]
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ 'main' ]
|
branches: ["main"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@ -27,7 +27,6 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ jobs:
|
|||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: "1.22"
|
||||||
|
|
||||||
- name: Setup web
|
- name: Setup web
|
||||||
run: bash build.sh dev web
|
run: bash build.sh dev web
|
||||||
@ -51,11 +50,11 @@ jobs:
|
|||||||
musl-target-format: $os-$musl-$arch
|
musl-target-format: $os-$musl-$arch
|
||||||
out-dir: build
|
out-dir: build
|
||||||
x-flags: |
|
x-flags: |
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$built_at
|
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$built_at
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=OpenList
|
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=OpenList
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$git_commit
|
github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$git_commit
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.Version=$tag
|
github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$tag
|
||||||
github.com/OpenListTeam/OpenList/internal/conf.WebVersion=dev
|
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=dev
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
10
build.sh
10
build.sh
@ -38,11 +38,11 @@ fi
|
|||||||
|
|
||||||
ldflags="\
|
ldflags="\
|
||||||
-w -s \
|
-w -s \
|
||||||
-X 'github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$builtAt' \
|
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$builtAt' \
|
||||||
-X 'github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=$gitAuthor' \
|
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=$gitAuthor' \
|
||||||
-X 'github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$gitCommit' \
|
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$gitCommit' \
|
||||||
-X 'github.com/OpenListTeam/OpenList/internal/conf.Version=$version' \
|
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$version' \
|
||||||
-X 'github.com/OpenListTeam/OpenList/internal/conf.WebVersion=$webVersion' \
|
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=$webVersion' \
|
||||||
"
|
"
|
||||||
|
|
||||||
FetchWebDev() {
|
FetchWebDev() {
|
||||||
|
Reference in New Issue
Block a user