Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Apr 26, 2024
0 parents commit e2c44d2
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
repository: SoftEtherVPN/SoftEtherVPN
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: |
echo "commit=$(git show --format='%h' --no-patch)" >> $GITHUB_ENV
mkdir build
cd build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake --build .
cpack -C Release -G DEB
sudo chown -R runner:runner .
- name: Upload
uses: actions/upload-artifact@v4
with:
name: SoftEtherVPN@${{ env.commit }}
path: build/_CPack_Packages/Linux/DEB/*.deb
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:

- name: Get latest version name
uses: oprypin/find-latest-tag@v1.1.2
id: latest
with:
repository: SoftEtherVPN/SoftEtherVPN
releases-only: true

- name: Checkout
uses: actions/checkout@v4
with:
repository: SoftEtherVPN/SoftEtherVPN
ref: ${{ steps.latest.outputs.tag }}
submodules: true

- name: Check tag exists
uses: mukunku/tag-exists-action@v1.6.0
id: check-tag
with:
tag: "${{ steps.latest.outputs.tag }}"

- name: Check confliction
run: |
if [ "${{ steps.check-tag.outputs.exists }}" == "true" ]; then
echo "Release is exists!"
echo -e "https://github.com/$GITHUB_REPOSITORY/releases/tag/${{ steps.latest.outputs.tag }}"
exit 1
fi
- 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
sudo chown -R runner:runner .
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.latest.outputs.tag }}
draft: false
prerelease: false
files: build/_CPack_Packages/Linux/DEB/*.deb
body: https://github.com/SoftEtherVPN/SoftEtherVPN/releases/tag/${{ steps.latest.outputs.tag }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SoftEther-DE-Builder

Build [**SoftEther VPN Developer Edition**](https://github.com/SoftEtherVPN/SoftEtherVPN "SoftEtherVPN/SoftEtherVPN: Cross-platform multi-protocol VPN software.") and Upload the deb packages.

0 comments on commit e2c44d2

Please sign in to comment.