Ship and run the Go binary instead of Node
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
This commit is contained in:
@@ -24,17 +24,18 @@ jobs:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Package archive
|
||||
run: |
|
||||
VERSION="${GITHUB_REF_NAME#v}"
|
||||
mkdir "awgcontrol-${VERSION}"
|
||||
cp -r awg-ctrl awg-ui awg-agent cli .env "awgcontrol-${VERSION}/"
|
||||
tar --exclude='node_modules' -czf "awgcontrol-${VERSION}.tar.gz" "awgcontrol-${VERSION}/"
|
||||
- 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}.tar.gz" \
|
||||
gh release create "${GITHUB_REF_NAME}" awgcontrol-"${VERSION}"-linux-*.tar.gz \
|
||||
--title "${GITHUB_REF_NAME}" --generate-notes --prerelease
|
||||
|
||||
Reference in New Issue
Block a user