Skip to content

Commit

Permalink
Create release automatically.
Browse files Browse the repository at this point in the history
Courtesy of EionRobb.

Also remove superflous linker flag.
  • Loading branch information
hoehermann committed Aug 29, 2024
1 parent 42eedbc commit f26334d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 7 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Linux
on:
- push
- pull_request

jobs:
build:
name: build
runs-on: ubuntu-20.04

steps:
- name: install deps
run: |
sudo apt update
sudo apt install -y libglib2.0-dev libopusfile-dev
# We only need these to build, not to run. Skip the dependency check.
sudo apt download libpurple0 libpurple-dev libgdk-pixbuf2.0-dev
sudo dpkg --force-depends -i libpurple0*.deb libpurple-dev*.deb libgdk-pixbuf2.0-dev*.deb
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-go@v5
with:
go-version: '>=1.21'

- name: make
run: |
cmake -B build -S .
cmake --build build
cpack -G DEB -B build --config build/CPackConfig.cmake
- name: archive
uses: actions/upload-artifact@v4
with:
path: build/*.deb

- name: release
if: contains(github.ref, 'tags/v')
uses: ncipollo/release-action@v1
with:
artifacts: build/*.deb
tag: nightly-${{ github.sha }}
name: Nightly ${{ github.sha }}
allowUpdates: true
artifactErrorsFailBuild: true
16 changes: 9 additions & 7 deletions .github/workflows/build.yml → .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: CMake Build

on: [push]
name: Windows Build
on:
- push

jobs:

build:
#if: contains(github.ref, 'tags/v')
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -33,7 +32,7 @@ jobs:
token: ${{ github.token }}

- name: Configure
run: cmake -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_MANIFEST_MODE=OFF -S . -B build -G "MSYS Makefiles" -DCMAKE_SHARED_LINKER_FLAGS="-static-libgcc"
run: cmake -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_MANIFEST_MODE=OFF -S . -B build -G "MSYS Makefiles"

- name: Build
run: cmake --build build
Expand All @@ -51,5 +50,8 @@ jobs:
if: contains(github.ref, 'tags/v')
uses: ncipollo/release-action@v1
with:
artifacts: libwhatsmeow.dll
bodyFile: CHANGELOG.md
artifacts: build/src/c/libwhatsmeow.dll
tag: nightly-${{ github.sha }}
name: Nightly ${{ github.sha }}
allowUpdates: true
artifactErrorsFailBuild: true

0 comments on commit f26334d

Please sign in to comment.