Skip to content

chore: Update dependencies #204

chore: Update dependencies

chore: Update dependencies #204

Workflow file for this run

name: Build and Release
on:
workflow_dispatch:
push:
branches: [main]
tags: [v*]
paths-ignore:
- "**/*.md"
pull_request:
branches: [main]
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
build:
name: Build for ${{ matrix.target.name }}
runs-on: ${{ matrix.target.runs-on }}
strategy:
fail-fast: false
matrix:
target:
- { runs-on: ubuntu-latest, os: linux, arch: amd64, name: linux-amd64 }
- { runs-on: self-hosted-ARM64, os: linux, arch: arm64, name: linux-arm64 }
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
# disable cache on self-hosted runners.
cache: false
go-version: 1.23
- name: Building libqmi
run: |
# Remove this step once libqmi 1.36 is available in the Ubuntu repository.
sudo apt-get update -y
sudo apt-get -qq install -y meson ninja-build pkg-config libglib2.0-dev libgudev-1.0-dev libqrtr-glib-dev
git clone https://gitlab.freedesktop.org/mobile-broadband/libqmi.git
cd libqmi
meson setup build --prefix=/usr --buildtype=release -Dmbim_qmux=false -Dfirmware_update=false -Dudev=false -Dman=false -Dgtk_doc=false -Dintrospection=false -Dbash_completion=false
ninja -j$(nproc) -C build
sudo ninja -C build install
- name: Build for ${{ matrix.target.name }}
run: |
go generate ./...
BUILD_VERSION=$(git describe --always --tags --match "v*" --dirty="-dev")
CGO_ENABLED=1 GOARCH=${{ matrix.target.arch }} go build -trimpath -ldflags="-w -s -X main.Version=$BUILD_VERSION" -o telegram-sms-${{ matrix.target.name }}
- name: Upload ${{ matrix.target.name }} to Artifact
uses: actions/upload-artifact@v4
with:
name: telegram-sms-${{ matrix.target.name }}
path: telegram-sms-${{ matrix.target.name }}
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: "*"
- name: Release
uses: softprops/action-gh-release@v2
with:
files: "*"