Releases now carry one archive per architecture with a static awg-control binary (services and CLI), the built frontend and .env; the installer no longer installs Node.js or runs npm. - tools/release/package.sh: CGO-free builds for linux/amd64 and arm64, version injected into `awg-control version`; used by both the GitHub and Gitea release workflows - install.sh: architecture check, per-arch archive, /usr/local/bin/awg-ctrl is a symlink to the binary, systemd unit without node in PATH, steps renumbered 1/6..6/6 - update from a Node install: the old services are stopped through the old CLI, then TS sources, node_modules and the old dist are removed; cli.env, panel.id and logs stay - README: one binary, its roles, architecture requirement
42 lines
981 B
YAML
42 lines
981 B
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Build frontend
|
|
working-directory: awg-ui
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
# Архив на архитектуру: Go-бинарник awg-control + собранный фронтенд + .env.
|
|
- name: Package archives
|
|
run: sh tools/release/package.sh "${GITHUB_REF_NAME#v}"
|
|
|
|
- name: Publish release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
gh release create "${GITHUB_REF_NAME}" awgcontrol-"${VERSION}"-linux-*.tar.gz \
|
|
--title "${GITHUB_REF_NAME}" --generate-notes --prerelease
|