mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-08 19:31:33 +08:00
ci: update build-release workflow to include asset name and additional build flags
This commit is contained in:
3
.github/workflows/build-release.yml
vendored
3
.github/workflows/build-release.yml
vendored
@@ -41,6 +41,7 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
|
variant: [full, micro, pico]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -61,11 +62,13 @@ jobs:
|
|||||||
extra_files: |
|
extra_files: |
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
|
build_flags: ${{ matrix.variant == 'full' && '' || (matrix.variant == 'micro' && '-tags=no_jsparser,no_minio' || '-tags=no_jsparser,no_minio,sqlite_glebarez') }}
|
||||||
ldflags: >-
|
ldflags: >-
|
||||||
-s -w
|
-s -w
|
||||||
-X "github.com/krau/SaveAny-Bot/config.Version=${{ env.VERSION }}"
|
-X "github.com/krau/SaveAny-Bot/config.Version=${{ env.VERSION }}"
|
||||||
-X "github.com/krau/SaveAny-Bot/config.BuildTime=${{ format(github.event.repository.updated_at, 'yyyy-MM-dd HH:mm:ss') }}"
|
-X "github.com/krau/SaveAny-Bot/config.BuildTime=${{ format(github.event.repository.updated_at, 'yyyy-MM-dd HH:mm:ss') }}"
|
||||||
-X "github.com/krau/SaveAny-Bot/config.GitCommit=${{ github.sha }}"
|
-X "github.com/krau/SaveAny-Bot/config.GitCommit=${{ github.sha }}"
|
||||||
binary_name: saveany-bot
|
binary_name: saveany-bot
|
||||||
|
asset_name: saveany-bot-${{ matrix.variant }}-${{ env.VERSION }}-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
|
|||||||
Reference in New Issue
Block a user