diff --git a/.github/workflows/deb.yml b/.github/workflows/deb.yml new file mode 100644 index 0000000..1f98acc --- /dev/null +++ b/.github/workflows/deb.yml @@ -0,0 +1,41 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Build wireguird .deb + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + +# - name: Install Package Dependencies +# run: | +# echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections +# sudo apt-get update +# sudo apt-get install -y wireguard-tools libgtk-3-dev libayatana-appindicator3-dev golang-go resolvconf + + - name: Build .deb + run: | + chmod +x *.sh + ./package_deb.sh + + - name: Install package + run: | + sudo apt install ./build/wireguird_amd64.deb + + + + diff --git a/deps.sh b/deps.sh index 78c6ce5..9660750 100755 --- a/deps.sh +++ b/deps.sh @@ -7,5 +7,8 @@ if [[ -f "/etc/os-release" ]]; then sudo apt install wireguard-tools libgtk-3-dev libayatana-appindicator3-dev golang-go resolvconf elif [[ "${ID}" == "debian" ]]; then sudo apt install wireguard-tools libgtk-3-dev libayatana-appindicator3-dev golang-go resolvconf + elif [[ "${ID}" == "linuxmint" ]]; then + sudo apt install wireguard-tools libgtk-3-dev libayatana-appindicator3-dev golang-go resolvconf + fi fi diff --git a/install.sh b/install.sh index 958f673..247c728 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,8 @@ if [[ -f "/etc/os-release" ]]; then #sudo rpm elif [[ "${ID}" == "ubuntu" ]]; then sudo dpkg -i ./build/wireguird_amd64.deb + elif [[ "${ID}" == "linuxmint" ]]; then + sudo dpkg -i ./build/wireguird_amd64.deb fi fi diff --git a/package.sh b/package.sh index c0fb9e9..3932e0c 100755 --- a/package.sh +++ b/package.sh @@ -7,5 +7,8 @@ if [[ -f "/etc/os-release" ]]; then elif [[ "${ID}" == "ubuntu" ]]; then echo "deb package" ./package_deb.sh + elif [[ "${ID}" == "linuxmint" ]]; then + echo "deb package" + ./package_deb.sh fi fi