ci: switch from builds.sr.ht manifest to forgejo action workflows

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-08-16 15:47:09 +02:00
parent 77ff1dc9a4
commit 6c0a9d68cc
Signed by: c8h4
GPG key ID: 1538094429952F86
5 changed files with 64 additions and 21 deletions

View file

@ -1,21 +0,0 @@
image: archlinux
arch: x86_64
packages:
- rust
- libxcb
artifacts:
- bwtui/target/release/bwtui
sources:
- https://git.sr.ht/~c8h4/bwtui
environment:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
tasks:
- test: |
cd bwtui
cargo clippy --no-deps
cargo test --all-features --no-fail-fast
cargo doc --all-features --no-deps
- build: |
cd bwtui
cargo build --release

View file

@ -10,3 +10,6 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.yaml]
indent_size = 2

View file

@ -0,0 +1,21 @@
---
name: flake
on:
push:
env:
NIX_CONFIG: 'experimental-features = nix-command flakes'
jobs:
build:
runs-on: nixos-unstable
steps:
- name: prepare nix container
run: nix-env -iA nixpkgs.nodejs
- name: checkout repository
uses: actions/checkout@v4
- name: run flake check
run: nix flake check -L

View file

@ -0,0 +1,37 @@
---
name: nightly build
on:
push:
branches:
- main
env:
NIX_CONFIG: 'experimental-features = nix-command flakes'
jobs:
build:
runs-on: nixos-unstable
steps:
- name: prepare nix container
run: nix-env -iA nixpkgs.nodejs
- name: checkout repository
uses: actions/checkout@v4
- name: run flake check
run: nix flake check -L
- name: build nightly binary
run: nix build .#bwtui
- name: upload binary
# v4 has a bug: https://github.com/go-gitea/gitea/issues/31354
# use v3 until it is fixed
uses: forgejo/upload-artifact@v3
with:
name: pmon-nightly-${{ env.GITHUB_SHA }}
path: result/bin/bwtui
retention-days: 14
if-no-files-found: error
overwrite: true

3
.prettierrc.json Normal file
View file

@ -0,0 +1,3 @@
{
"singleQuote": true
}