6 Commits

Author SHA1 Message Date
a3e4154fb6 bump: v0.0.25 -> v0.0.26
Some checks failed
Check / check (push) Has been skipped
Release / check (push) Successful in 55s
Release / release (push) Failing after 1m30s
Release / package (push) Has been skipped
2025-05-14 05:55:36 -04:00
4839b74bf7 feat: gitea workflows
All checks were successful
Check / check (push) Successful in 52s
2025-05-14 05:48:08 -04:00
dcf5a16c3f fix: import buf 2025-05-14 05:13:11 -04:00
932d82c1fc fix: update buf deps 2025-05-14 05:11:19 -04:00
db509ffa8a feat: auto updates 2025-05-14 05:00:06 -04:00
c4392601b1 fix: bump correctly 2025-05-14 04:39:13 -04:00
11 changed files with 202 additions and 14 deletions

View File

@ -0,0 +1,33 @@
name: Check
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, edited, auto_merge_enabled]
jobs:
check:
name: check
runs-on: ubuntu-latest
if: |
contains(github.event.head_commit.message, 'bump:') == false &&
contains(github.event.head_commit.message, 'Merge pull request') == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check

View File

@ -0,0 +1,99 @@
name: Release
on:
push:
tags:
- "*"
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check
run: nix flake check
release:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
run: >
nix build
.#trevstack-linux-amd64
.#trevstack-linux-arm64
.#trevstack-linux-arm
.#trevstack-windows-amd64
.#trevstack-darwin-amd64
.#trevstack-darwin-arm64
- name: Release
uses: akkuman/gitea-release-action@v1
with:
files: |-
result*/bin/*
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
package:
runs-on: ubuntu-latest
needs: release # Wait for binary cache to propagate
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.URL }}
username: ${{ vars.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -0,0 +1,39 @@
name: Update
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# https://github.com/actions/checkout/issues/13
- name: Set Git Config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Update
run: nix run .#update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: update
body: automatic update

View File

@ -5,7 +5,7 @@ on:
branches:
- main
pull_request:
types: [opened, reopened, edited]
types: [opened, reopened, edited, auto_merge_enabled]
jobs:
check:

View File

@ -5,6 +5,10 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
@ -35,5 +39,10 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
delete-branch: true
title: Bump deps
title: update
body: automatic update
- name: Enable Automerge
run: gh pr merge --merge --auto "1"
env:
GH_TOKEN: ${{ secrets.PAT }}

View File

@ -7,7 +7,7 @@ version=${git_version#v}
major=$(echo "${version}" | cut -d . -f1)
minor=$(echo "${version}" | cut -d . -f2)
patch=$(echo "${version}" | cut -d . -f3)
case "${1}" in
case "${1-patch}" in
major) major=$((major + 1)) ;;
minor) minor=$((minor + 1)) ;;
*) patch=$((patch + 1)) ;;

View File

@ -11,6 +11,13 @@ if ! git diff --exit-code flake.lock; then
git commit -m "build(nix): updated nix dependencies"
fi
echo "updating protobuf deps"
buf dep update
if ! git diff --exit-code buf.lock; then
git add buf.lock
git commit -m "build(buf): updated buf dependencies"
fi
echo "updating client"
cd "${git_root}/client"
npm update --save && npm i

View File

@ -1,12 +1,12 @@
{
"name": "trevstack",
"version": "0.0.25",
"version": "0.0.26",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "trevstack",
"version": "0.0.25",
"version": "0.0.26",
"devDependencies": {
"@bufbuild/protovalidate": "^0.1.1",
"@connectrpc/connect": "^2.0.2",

View File

@ -1,7 +1,7 @@
{
"name": "trevstack",
"private": true,
"version": "0.0.25",
"version": "0.0.26",
"type": "module",
"scripts": {
"dev": "vite dev",

View File

@ -21,7 +21,7 @@
...
}: let
pname = "trevstack";
version = "0.0.25";
version = "0.0.26";
build-systems = [
"x86_64-linux"
@ -92,7 +92,7 @@
revive
sqlc
# database
# Database
sqlite
dbmate
sqlfluff
@ -127,7 +127,7 @@
pname = "check-client";
inherit version;
src = ./client;
npmDepsHash = "sha256-IVTm9gQx2ceQoqyJfIz1PJeq3/yb/3NSgMNTIWSsDMQ=";
npmDepsHash = "sha256-D95Q+FyfuF9GI2ALaAvmrP45g74aK5vg/bN0xyNyRZU=";
dontNpmInstall = true;
buildPhase = ''
@ -160,9 +160,10 @@
runtimeInputs = with pkgs; [
git
nix
nodejs_22
go
nix-update
go
buf
nodejs_22
];
text = builtins.readFile ./.scripts/update.sh;
});
@ -189,7 +190,7 @@
client = pkgs.buildNpmPackage {
inherit pname version;
src = ./client;
npmDepsHash = "sha256-IVTm9gQx2ceQoqyJfIz1PJeq3/yb/3NSgMNTIWSsDMQ=";
npmDepsHash = "sha256-D95Q+FyfuF9GI2ALaAvmrP45g74aK5vg/bN0xyNyRZU=";
installPhase = ''
cp -r build "$out"

View File

@ -3,7 +3,7 @@ servers:
- url: /grpc
info:
title: Trevstack API
version: 0.0.25
version: 0.0.26
description: API for Trevstack
contact:
name: Trev