mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-28 22:05:48 +08:00
Release workflows: a minimal set for a release of the development branch
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
A release whose tree has DEVEL and no RELEASE is one of the development branch (release-kind.yml, called by the workflows below). For it only the Windows x64 zip, the x86_64 and arm64 deb packages and the rpm for EL 9 and 10 (x86_64 and arm64) are built and added to the release: no Docker images, no source tarball, no ipk, armhf, watcom, win32 or Windows arm64 builds. docker.yml makes it a prerelease, not "Latest", which also keeps it out of the package repository 3proxy.github.io builds from releases. The packaging reads the version from RELEASE or DEVEL. rpm names the source archive and its directory after the spec's Version, which for 2.0.0-devel is 2.0.0~devel, so that %setup finds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7fab9c488d
commit
9ce5de971f
6
.github/workflows/build-ipk.yml
vendored
6
.github/workflows/build-ipk.yml
vendored
@ -12,7 +12,13 @@ env:
|
||||
OPENWRT_RELEASE: 24.10.0
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
ipk:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
28
.github/workflows/build-rpm-arm64.yml
vendored
28
.github/workflows/build-rpm-arm64.yml
vendored
@ -25,7 +25,19 @@ jobs:
|
||||
- name: env
|
||||
run: |
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
# a release branch has RELEASE; the development one DEVEL, such as
|
||||
# 2.0.0-devel, built for fewer EL releases
|
||||
if [ -f RELEASE ]; then
|
||||
RELEASE=$(tr -d ' \t\r\n' < RELEASE)
|
||||
echo "ELS=8 9 10" >> $GITHUB_ENV
|
||||
else
|
||||
RELEASE=$(tr -d ' \t\r\n' < DEVEL)
|
||||
echo "ELS=9 10" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
|
||||
# rpm's Version, with a tilde for a hyphen (2.0.0~devel): the source
|
||||
# archive and its directory are named after it
|
||||
echo "RPMVERSION=$(sed -n 's/^Version:[[:space:]]*//p' scripts/rh/3proxy.spec)" >> $GITHUB_ENV
|
||||
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
|
||||
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
|
||||
@ -41,19 +53,19 @@ jobs:
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz --transform "s,^,3proxy-$RPMVERSION/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz ~/rpmbuild/SOURCES/$RPMVERSION.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RPMVERSION.spec
|
||||
tar -czf ~/debian/3proxy_$RELEASE.orig.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
- name: rpmbuild
|
||||
run: |
|
||||
mkdir -p rpmout
|
||||
for EL in 8 9 10; do
|
||||
for EL in $ELS; do
|
||||
docker run --rm \
|
||||
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
|
||||
-v "$HOME/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz:/src.tar.gz:ro" \
|
||||
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
|
||||
-v "$PWD/rpmout:/out" \
|
||||
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||
-e RELEASE="$RPMVERSION" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||
"almalinux:$EL" bash -c '
|
||||
set -e
|
||||
|
||||
6
.github/workflows/build-rpm-armhf.yml
vendored
6
.github/workflows/build-rpm-armhf.yml
vendored
@ -9,7 +9,13 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
ci:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
28
.github/workflows/build-rpm-x86-64.yml
vendored
28
.github/workflows/build-rpm-x86-64.yml
vendored
@ -25,7 +25,19 @@ jobs:
|
||||
- name: env
|
||||
run: |
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
# a release branch has RELEASE; the development one DEVEL, such as
|
||||
# 2.0.0-devel, built for fewer EL releases
|
||||
if [ -f RELEASE ]; then
|
||||
RELEASE=$(tr -d ' \t\r\n' < RELEASE)
|
||||
echo "ELS=8 9 10" >> $GITHUB_ENV
|
||||
else
|
||||
RELEASE=$(tr -d ' \t\r\n' < DEVEL)
|
||||
echo "ELS=9 10" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
|
||||
# rpm's Version, with a tilde for a hyphen (2.0.0~devel): the source
|
||||
# archive and its directory are named after it
|
||||
echo "RPMVERSION=$(sed -n 's/^Version:[[:space:]]*//p' scripts/rh/3proxy.spec)" >> $GITHUB_ENV
|
||||
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
|
||||
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
|
||||
@ -41,19 +53,19 @@ jobs:
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz --transform "s,^,3proxy-$RPMVERSION/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz ~/rpmbuild/SOURCES/$RPMVERSION.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RPMVERSION.spec
|
||||
tar -czf ~/debian/3proxy_$RELEASE.orig.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
- name: rpmbuild
|
||||
run: |
|
||||
mkdir -p rpmout
|
||||
for EL in 8 9 10; do
|
||||
for EL in $ELS; do
|
||||
docker run --rm \
|
||||
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
|
||||
-v "$HOME/rpmbuild/SOURCES/3proxy-$RPMVERSION.tar.gz:/src.tar.gz:ro" \
|
||||
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
|
||||
-v "$PWD/rpmout:/out" \
|
||||
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||
-e RELEASE="$RPMVERSION" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||
"almalinux:$EL" bash -c '
|
||||
set -e
|
||||
|
||||
6
.github/workflows/build-watcom.yml
vendored
6
.github/workflows/build-watcom.yml
vendored
@ -9,7 +9,13 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
ci:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
6
.github/workflows/build-win32.yml
vendored
6
.github/workflows/build-win32.yml
vendored
@ -9,7 +9,13 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
ci:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
4
.github/workflows/build-win64.yml
vendored
4
.github/workflows/build-win64.yml
vendored
@ -27,7 +27,9 @@ jobs:
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
# a release branch has RELEASE, the development one DEVEL
|
||||
if (Test-Path "RELEASE") { $RELEASE = (Get-Content -Path "RELEASE" -Raw).Trim() }
|
||||
else { $RELEASE = (Get-Content -Path "DEVEL" -Raw).Trim() }
|
||||
echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
6
.github/workflows/build-winarm64.yml
vendored
6
.github/workflows/build-winarm64.yml
vendored
@ -9,7 +9,13 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
ci:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
@ -13,7 +13,17 @@ env:
|
||||
GHCR_IMAGE: ghcr.io/3proxy/3proxy
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
permissions:
|
||||
contents: write
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
with:
|
||||
mark-prerelease: true
|
||||
|
||||
build:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
name: ${{ matrix.image }} ${{ matrix.platform }}
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
46
.github/workflows/release-kind.yml
vendored
Normal file
46
.github/workflows/release-kind.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: Release kind
|
||||
|
||||
# Whether a release is one of the development branch: its tree has DEVEL
|
||||
# and no RELEASE. Such a release gets the minimal set of packages (Windows
|
||||
# x64, deb x86_64 and arm64, rpm for EL 9 and 10), no Docker images, and is
|
||||
# made a prerelease: neither "Latest" nor taken into the package repository
|
||||
# of 3proxy.github.io, which takes releases only.
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
mark-prerelease:
|
||||
description: "make a release of the development branch a prerelease"
|
||||
type: boolean
|
||||
default: false
|
||||
outputs:
|
||||
devel:
|
||||
description: "true for a release of the development branch"
|
||||
value: ${{ jobs.kind.outputs.devel }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
devel: ${{ steps.kind.outputs.devel }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
sparse-checkout: |
|
||||
RELEASE
|
||||
DEVEL
|
||||
sparse-checkout-cone-mode: false
|
||||
- id: kind
|
||||
run: |
|
||||
if [ ! -f RELEASE ] && [ -f DEVEL ]; then devel=true; else devel=false; fi
|
||||
echo "devel=$devel" >> "$GITHUB_OUTPUT"
|
||||
echo "release of the development branch: $devel"
|
||||
- name: Make it a prerelease
|
||||
if: inputs.mark-prerelease && github.event_name == 'release' && steps.kind.outputs.devel == 'true' && !github.event.release.prerelease
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ github.event.release.tag_name }}
|
||||
run: gh release edit "$TAG" -R "$GITHUB_REPOSITORY" --prerelease --latest=false
|
||||
6
.github/workflows/release-tarball.yml
vendored
6
.github/workflows/release-tarball.yml
vendored
@ -9,7 +9,13 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
uses: ./.github/workflows/release-kind.yml
|
||||
|
||||
tarball:
|
||||
# not for a release of the development branch
|
||||
needs: kind
|
||||
if: github.event_name != 'release' || needs.kind.outputs.devel != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
Loading…
Reference in New Issue
Block a user