Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

chore: add automate deploy cross platform

Aldino Kemal26f795113b79
diff --git a/.github/workflows/deploy-linux.yml b/.github/workflows/deploy-linux.yml
new file mode 100644
index 00000000..aba7bba6
--- /dev/null
+++ b/.github/workflows/deploy-linux.yml
@@ -0,0 +1,38 @@
+name: Release Linux Version
+
+on:
+ workflow_dispatch:
+ push:
+ tags:
+ - 'v[0-9]+.[0-9]+.[0-9]+'
+ branches-ignore:
+ - '*'
+
+jobs:
+ release-linux:
+ if: startsWith(github.ref, 'refs/tags/v')
+ runs-on: ubuntu-latest
+ environment: production
+ steps:
+ - uses: actions/checkout@v3
+ - name: Ubuntu update package
+ run: |
+ sudo apt update -y
+ sudo apt install libvips-dev
+ - name: Golang Installation
+ uses: actions/setup-go@v3
+ with:
+ go-version: '1.18'
+ - name: Golang setup dependency
+ run: |
+ go version
+ go install github.com/markbates/pkger/cmd/pkger@latest
+ - name: Golang build
+ run: |
+ cd src && pkger && go build -o linux-amd64
+ - name: Deploy artifact to release ${{ github.ref_name }}
+ uses: AButler/[email protected]
+ with:
+ files: 'src/linux-amd64'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ release-tag: ${{ github.ref_name }}
diff --git a/.github/workflows/deploy-mac.yml b/.github/workflows/deploy-mac.yml
new file mode 100644
index 00000000..a8741ea4
--- /dev/null
+++ b/.github/workflows/deploy-mac.yml
@@ -0,0 +1,37 @@
+name: Release Mac Version
+
+on:
+ workflow_dispatch:
+ push:
+ tags:
+ - 'v[0-9]+.[0-9]+.[0-9]+'
+ branches-ignore:
+ - '*'
+
+jobs:
+ release-macos:
+ if: startsWith(github.ref, 'refs/tags/v')
+ runs-on: macos-latest
+ environment: production
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install libvips
+ run: |
+ brew install vips
+ - name: Golang Installation
+ uses: actions/setup-go@v3
+ with:
+ go-version: '1.18'
+ - name: Golang setup dependency
+ run: |
+ go version
+ go install github.com/markbates/pkger/cmd/pkger@latest
+ - name: Golang build
+ run: |
+ cd src && pkger && go build -o darwin-amd64
+ - name: Deploy artifact to release ${{ github.ref_name }}
+ uses: AButler/[email protected]
+ with:
+ files: 'src/darwin-amd64'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ release-tag: ${{ github.ref_name }}
diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml
new file mode 100644
index 00000000..f50d4fd5
--- /dev/null
+++ b/.github/workflows/deploy-windows.yml
@@ -0,0 +1,52 @@
+name: Release Windows Version
+
+on:
+ workflow_dispatch:
+ push:
+ tags:
+ - 'v[0-9]+.[0-9]+.[0-9]+'
+ branches-ignore:
+ - '*'
+
+jobs:
+ release-windows:
+ if: startsWith(github.ref, 'refs/tags/v')
+ runs-on: windows-latest
+ environment: production
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install pkgconfig
+ uses: crazy-max/[email protected]
+ with:
+ ref: ${{ github.ref_name }}
+ args: install pkgconfiglite
+ - name: Vips download
+ run: curl -LO https://hydrogendioxide.net/vips-dev-8.12.zip
+ - name: Vips Extract
+ run: |
+ 7z x .\vips-dev-8.12.zip
+ - name: Vips add to path
+ shell: pwsh
+ run: |
+ Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\lib\pkgconfig\* -Destination C:/Strawberry/c/lib/pkgconfig -force -recurse
+ Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\bin\* -Destination C:/Strawberry/c/bin -force -recurse
+ Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\include\* -Destination C:/Strawberry/c/include -force -recurse
+ - name: Golang Installation
+ uses: actions/setup-go@v3
+ with:
+ go-version: '1.18'
+ - name: Golang setup dependency
+ run: |
+ go version
+ go install github.com/markbates/pkger/cmd/pkger@latest
+ - name: Golang build
+ run: |
+ [Environment]::SetEnvironmentVariable("Path", $env:Path + ";${{ github.workspace }}\vips-dev-8.12\bin")
+ [Environment]::SetEnvironmentVariable("PKG_CONFIG_PATH", "${{ github.workspace }}\vips-dev-8.12\lib\pkgconfig")
+ cd src && pkger.exe && go build -o windows-amd64.exe
+ - name: Deploy artifact to release ${{ github.ref_name }}
+ uses: AButler/[email protected]
+ with:
+ files: 'src/windows-amd64.exe'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ release-tag: ${{ github.ref_name }}
diff --git a/readme.md b/readme.md
index 25663bcb..a6821d89 100644
--- a/readme.md
+++ b/readme.md
@@ -74,7 +74,7 @@
- `docker run --detach --publish=3000:3000 --name=whatsapp --restart=always --volume=$(docker volume create --name=whatsapp):/app/storages aldinokemal2104/go-whatsapp-web-multidevice --autoreply="Dont't reply this message please"`
-### Production Mode (binary | not distributed again since v3.5.0)
+### Production Mode (binary)
- download binary from [release](https://github.com/aldinokemal/go-whatsapp-web-multidevice/releases)