mirror of https://github.com/bjdgyc/anylink.git
添加 Release
This commit is contained in:
parent
f9ff92d73d
commit
fbd799f9f9
|
@ -64,18 +64,23 @@ jobs:
|
|||
#cache-to: type=gha,mode=max
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
#platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
appVer=${{ env.APP_VER }}
|
||||
commitId=${{ env.commitId }}
|
||||
#tags: bjdgyc/anylink:latest,bjdgyc/anylink:${{ env.APP_VER }}
|
||||
tags: bjdgyc/anylink:${{ env.APP_VER }}
|
||||
|
||||
- name: Build Copy binary
|
||||
- name: Build deploy binary
|
||||
shell: bash
|
||||
run: |
|
||||
#sudo apt-get install -y -q gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||
bash release.sh
|
||||
run: bash release.sh
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: artifact/*
|
||||
|
||||
# Docker:
|
||||
# name: build-docker
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
anylink-deploy
|
||||
anylink-deploy.tar.gz
|
||||
|
||||
dist
|
||||
dist
|
||||
artifact-dist
|
26
release.sh
26
release.sh
|
@ -17,30 +17,32 @@ cpath=$(pwd)
|
|||
ver=$(cat version)
|
||||
echo "当前版本 $ver"
|
||||
|
||||
mkdir archive anylink-deploy
|
||||
mkdir artifact-dist
|
||||
rm -rf artifact-dist/* app
|
||||
|
||||
function archive() {
|
||||
os=$1
|
||||
arch=$2
|
||||
echo "整理部署文件 $os $arch"
|
||||
#echo "整理部署文件 $os $arch"
|
||||
|
||||
deploy="anylink-$ver-$os-$arch"
|
||||
docker container create --platform $os/$arch --name $deploy bjdgyc/anylink
|
||||
rm -rf anylink-deploy/*
|
||||
docker cp -a $deploy:/app/ ./anylink-deploy/
|
||||
ls -lh anylink-deploy
|
||||
tar zcf ${deploy}.tar.gz anylink-deploy
|
||||
mv ${deploy}.tar.gz archive/
|
||||
}
|
||||
docker container create --platform $os/$arch --name $deploy bjdgyc/anylink:$ver
|
||||
docker cp -a $deploy:/app ./
|
||||
|
||||
rm -rf anylink-deploy
|
||||
mv app anylink-deploy
|
||||
ls -lh anylink-deploy
|
||||
|
||||
tar zcf ${deploy}.tar.gz anylink-deploy
|
||||
mv ${deploy}.tar.gz artifact-dist/
|
||||
}
|
||||
|
||||
echo "copy二进制文件"
|
||||
|
||||
archive linux amd64
|
||||
archive linux arm64
|
||||
|
||||
ls -lh archive
|
||||
#archive linux arm64
|
||||
|
||||
ls -lh artifact
|
||||
|
||||
#注意使用root权限运行
|
||||
#cd anylink-deploy
|
||||
|
|
|
@ -101,22 +101,11 @@ func addInitData() error {
|
|||
|
||||
// SettingDnsProvider
|
||||
provider := &SettingLetsEncrypt{
|
||||
Domain: "vpn.xxx.com",
|
||||
Legomail: "legomail",
|
||||
Name: "aliyun",
|
||||
Renew: false,
|
||||
DNSProvider: DNSProvider{
|
||||
AliYun: struct {
|
||||
APIKey string `json:"apiKey"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{APIKey: "", SecretKey: ""},
|
||||
TXCloud: struct {
|
||||
SecretID string `json:"secretId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{SecretID: "", SecretKey: ""},
|
||||
CfCloud: struct {
|
||||
AuthToken string `json:"authToken"`
|
||||
}{AuthToken: ""}},
|
||||
Domain: "vpn.xxx.com",
|
||||
Legomail: "legomail",
|
||||
Name: "aliyun",
|
||||
Renew: false,
|
||||
DNSProvider: DNSProvider{},
|
||||
}
|
||||
err = SettingSessAdd(sess, provider)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue