Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
permissions:
contents: write
steps:
- name: Get latest version name
uses: oprypin/[email protected]
id: latest
with:
repository: SoftEtherVPN/SoftEtherVPN
releases-only: true
- name: Get previous version name
uses: oprypin/[email protected]
id: previous
with:
repository: ${{ github.repository }}
releases-only: true
- name: Check confliction
run: |
if [ "${{ steps.latest.outputs.tag }}" == "${{ steps.previous.outputs.tag }}" ]; then
echo "Release is exists!"
echo -e "https://github.com/$GITHUB_REPOSITORY/releases/tag/${{ steps.latest.outputs.tag }}"
exit 1
fi
- name: Checkout SoftEtherVPN
uses: actions/checkout@v4
with:
repository: SoftEtherVPN/SoftEtherVPN
ref: ${{ steps.latest.outputs.tag }}
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libsodium-dev libssl-dev make zlib1g-dev liblz4-dev libnl-genl-3-dev
- name: Build
run: |
mkdir build
cd build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake --build .
cpack -C Release -G DEB
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.latest.outputs.tag }}
draft: false
prerelease: false
make_latest: true
files: build/*.deb
body: |
https://github.com/SoftEtherVPN/SoftEtherVPN/releases/tag/${{ steps.latest.outputs.tag }}
https://github.com/SoftEtherVPN/SoftEtherVPN/compare/${{ steps.previous.outputs.tag }}...${{ steps.latest.outputs.tag }}