Skip to content

Merge pull request #49 from Labfox/dependabot/pip/watchdog-5.0.3 #85

Merge pull request #49 from Labfox/dependabot/pip/watchdog-5.0.3

Merge pull request #49 from Labfox/dependabot/pip/watchdog-5.0.3 #85

Workflow file for this run

# 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: Go
on:
push:
branches: [ "main" ]
schedule:
- cron: "1 1 * * *"
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: |
cd whatsfly/dependencies
go get -u
go mod tidy
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -buildmode=c-shared -ldflags=-s -o ./whatsmeow/static/whatsmeow-linux-amd64.so ./main.go
- name: Upload Linux binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-linux-amd64-v20.so
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so
- name: Upload Linux binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-linux-amd64-v20.h
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.h
build-windows:
runs-on: windows-latest
if: false
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
env:
GOOS: windows
GOARCH: amd64
CGO_ENABLED: 1
CC: x86_64-w64-mingw32-gcc
run: |
go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-windows-64.dll ./whatsfly/dependencies/main.go
- name: Commit changes
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Actions"
git add *
git commit -am "New build for $GITHUB_SHA"
git fetch
git push
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
env:
CGO_ENABLED: 1
run: |
cd whatsfly/dependencies
go get -u
go mod tidy
GOOS=darwin GOARCH=amd64 go build -v -buildmode=c-shared -o ./whatsmeow/static/whatsmeow-darwin-amd64.dylib ./main.go
GOOS=darwin GOARCH=arm64 go build -v -buildmode=c-shared -o ./whatsmeow/static/whatsmeow-darwin-arm64.dylib ./main.go
- name: Upload macos binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-darwin-amd64-v20.dylib
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.dylib
- name: Upload macos binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-darwin-amd64-v20.h
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.h
- name: Upload macos binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-darwin-arm64-v20.dylib
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.dylib
- name: Upload macos binaries
uses: actions/upload-artifact@v4
with:
name: whatsmeow-darwin-arm64-v20.h
path: whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.h