From 115091e517d8a88133a8ff54dc74773e931d1744 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sat, 22 Nov 2025 01:30:29 -0800 Subject: [PATCH] add deployment workflow --- .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4199b0a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: {} + +permissions: + contents: write + +jobs: + goreleaser: + name: GoReleaser + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: true + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GH_CPAT }} + homebrew: + name: Bump Homebrew formula + # Skip this job in case of git pushes to prerelease tags + if: ${{ github.event_name != 'push' || !contains(github.ref, '-') }} + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Extract version + id: extract-version + run: | + echo "tag-name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: ke + formula-path: Formula/kw.rb + homebrew-tap: kisom/homebrew-tap + base-branch: master + commit-message: | + {{formulaName}} {{version}} + + Created by https://github.com/mislav/bump-homebrew-formula-action + env: + COMMITTER_TOKEN: ${{ secrets.GH_CPAT }} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 44aad3f..8894e5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15) project(ke C) # Specify C language explicitly set(CMAKE_C_STANDARD 99) -set(KE_VERSION "1.0.0") +set(KE_VERSION "1.0.3") set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")