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