Skip to content

修改:Makefile,支持更多系统和架构 #29

修改:Makefile,支持更多系统和架构

修改:Makefile,支持更多系统和架构 #29

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*' # Trigger on tags that start with 'v'
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.1' # Adjust to your desired Go version
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install UPX
run: |
latest_version=$(curl -s https://api.github.com/repos/upx/upx/releases/latest | grep -o '"tag_name": "v.*"' | cut -d'"' -f4)
download_url="https://github.com/upx/upx/releases/download/${latest_version}/upx-${latest_version#v}-amd64_linux.tar.xz"
curl -L -o upx.tar.xz $download_url
tar -xJf upx.tar.xz
mv upx-*-amd64_linux/upx /usr/local/bin/
- name: Build and Release
env:
NAME: connect_jxyy_network # Adjust the project name
BINDIR: bin
run: |
make releases
cp config_example.yaml bin/config.yaml
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
files: bin/*
draft: true
token: ${{ secrets.GHCR_PAT }} # Use a GitHub Personal Access Token