mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-06 22:55:38 +08:00
feat: edit v2 goreleaser
This commit is contained in:
parent
858322e1fa
commit
80e3693c5f
4 changed files with 43 additions and 12 deletions
2
.github/workflows/build-publish-to-oss.yml
vendored
2
.github/workflows/build-publish-to-oss.yml
vendored
|
@ -44,4 +44,4 @@ jobs:
|
|||
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
||||
ossutil-version: '1.7.18'
|
||||
- name: Upload Assets to OSS
|
||||
run: ossutil cp -r dist/ oss://resource-fit2cloud-com/1panel/package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --only-current-dir --force
|
||||
run: ossutil cp -r dist/ oss://resource-fit2cloud-com/1panel/package/v2/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --only-current-dir --force
|
||||
|
|
2
.github/workflows/build-publish-to-r2.yml
vendored
2
.github/workflows/build-publish-to-r2.yml
vendored
|
@ -42,4 +42,4 @@ jobs:
|
|||
rclone_config: ${{ secrets.RCLONE_CONFIG }}
|
||||
- name: Upload to Cloudflare R2
|
||||
run: |
|
||||
rclone copy dist/ cloudflare_r2:package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --progress
|
||||
rclone copy dist/ cloudflare_r2:package/v2/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --progress
|
||||
|
|
|
@ -9,11 +9,34 @@ before:
|
|||
- chmod +x ./ci/script.sh
|
||||
- ./ci/script.sh
|
||||
- sed -i 's@ORIGINAL_VERSION=.*@ORIGINAL_VERSION=v{{ .Version }}@g' 1pctl
|
||||
- go mod tidy
|
||||
- cd ./core && go mod tidy
|
||||
- cd ./agent && go mod tidy
|
||||
|
||||
builds:
|
||||
- main: ./cmd/server/main.go
|
||||
binary: 1panel
|
||||
- id: agent
|
||||
main: ./agent/cmd/server/main.go
|
||||
binary: 1panel-agent
|
||||
flags:
|
||||
- -tags=xpack
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -w -s
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
goarm:
|
||||
- 7
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
- ppc64le
|
||||
- s390x
|
||||
|
||||
- id: core
|
||||
main: ./core/cmd/server/main.go
|
||||
binary: 1panel-core
|
||||
flags:
|
||||
- -tags=xpack
|
||||
- -trimpath
|
||||
|
@ -34,11 +57,15 @@ builds:
|
|||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
builds:
|
||||
- core
|
||||
- agent
|
||||
name_template: "1panel-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{- if .Arm }}v{{ .Arm }}{{ end }}"
|
||||
wrap_in_directory: true
|
||||
files:
|
||||
- 1pctl
|
||||
- 1panel.service
|
||||
- 1panel-core.service
|
||||
- 1panel-agent.service
|
||||
- install.sh
|
||||
- GeoIP.mmdb
|
||||
- lang/*
|
||||
|
|
16
ci/script.sh
16
ci/script.sh
|
@ -6,15 +6,19 @@ command -v wget >/dev/null || {
|
|||
}
|
||||
|
||||
if [ ! -f "1pctl" ]; then
|
||||
wget https://github.com/1Panel-dev/installer/raw/main/1pctl
|
||||
fi
|
||||
|
||||
if [ ! -f "1panel.service" ]; then
|
||||
wget https://github.com/1Panel-dev/installer/raw/main/1panel.service
|
||||
wget https://github.com/1Panel-dev/installer/raw/v2/1pctl
|
||||
fi
|
||||
|
||||
if [ ! -f "install.sh" ]; then
|
||||
wget https://github.com/1Panel-dev/installer/raw/main/install.sh
|
||||
wget https://github.com/1Panel-dev/installer/raw/v2/install.sh
|
||||
fi
|
||||
|
||||
if [ ! -f "1panel-core.service" ]; then
|
||||
wget https://github.com/1Panel-dev/installer/raw/v2/1panel-core.service
|
||||
fi
|
||||
|
||||
if [ ! -f "1panel-agent.service" ]; then
|
||||
wget https://github.com/1Panel-dev/installer/raw/v2/1panel-agent.service
|
||||
fi
|
||||
|
||||
if [ ! -f "GeoIP.mmdb" ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue