Skip to content

Commit ca653af

Browse files
committed
refactor: lint and refactor
1 parent c93af4d commit ca653af

34 files changed

Lines changed: 6213 additions & 2879 deletions

.githooks/pre-commit

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
include:
15+
- target: bun-windows-x64
16+
artifact: inspectarr-windows-x64.exe
17+
- target: bun-darwin-x64
18+
artifact: inspectarr-macos-x64
19+
- target: bun-darwin-arm64
20+
artifact: inspectarr-macos-arm64
21+
- target: bun-linux-x64-musl
22+
artifact: inspectarr-linux-x64
23+
- target: bun-linux-arm64-musl
24+
artifact: inspectarr-linux-arm64
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v5
29+
30+
- name: Setup Bun
31+
uses: oven-sh/setup-bun@v2
32+
with:
33+
bun-version: latest
34+
35+
- name: Install dependencies
36+
run: bun install --production
37+
38+
- name: Build binary
39+
run: bun build --compile --sourcemap --target=${{ matrix.target }} --outfile=${{ matrix.artifact }} src/index.ts
40+
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ${{ matrix.artifact }}
45+
path: ${{ matrix.artifact }}
46+
47+
release:
48+
needs: build
49+
# if: github.ref_type == 'tag'
50+
runs-on: ubuntu-latest
51+
permissions:
52+
contents: write
53+
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v5
57+
58+
- name: Setup Bun
59+
uses: oven-sh/setup-bun@v2
60+
with:
61+
bun-version: latest
62+
63+
- name: Download all artifacts
64+
uses: actions/download-artifact@v4
65+
with:
66+
path: ./artifacts
67+
68+
- name: Release
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
files: |
72+
./artifacts/inspectarr-windows-x64.exe/inspectarr-windows-x64.exe
73+
./artifacts/inspectarr-macos-x64/inspectarr-macos-x64
74+
./artifacts/inspectarr-macos-arm64/inspectarr-macos-arm64
75+
./artifacts/inspectarr-linux-x64/inspectarr-linux-x64
76+
./artifacts/inspectarr-linux-arm64/inspectarr-linux-arm64
77+
78+
- name: Process package templates
79+
run: |
80+
bun ./package_templates/template-processor.ts "${GITHUB_REF_NAME#v}"
81+
82+
- name: Set up git
83+
run: |
84+
git config --global user.email adamhl@pm.me
85+
git config --global user.name "GitHub Actions"
86+
87+
- name: Update homebrew tap
88+
env:
89+
INSPECTARR_PACKAGE_TOKEN: ${{ secrets.INSPECTARR_PACKAGE_TOKEN }}
90+
run: |
91+
REPO="https://adamhl8:${INSPECTARR_PACKAGE_TOKEN}@github.com/adamhl8/homebrew-inspectarr.git"
92+
CLONE_DIR=$(mktemp -d)
93+
git clone --depth 1 "${REPO}" "${CLONE_DIR}"
94+
cp ./package_templates/homebrew/inspectarr.rb "${CLONE_DIR}/Formula/inspectarr.rb"
95+
cd "${CLONE_DIR}"
96+
git add -A
97+
git commit -m "${{ github.ref_name }}"
98+
git push "${REPO}"
99+
100+
- name: Update scoop bucket
101+
env:
102+
INSPECTARR_PACKAGE_TOKEN: ${{ secrets.INSPECTARR_PACKAGE_TOKEN }}
103+
run: |
104+
REPO="https://adamhl8:${INSPECTARR_PACKAGE_TOKEN}@github.com/adamhl8/scoop-inspectarr.git"
105+
CLONE_DIR=$(mktemp -d)
106+
git clone --depth 1 "${REPO}" "${CLONE_DIR}"
107+
cp ./package_templates/scoop/inspectarr.json "${CLONE_DIR}/inspectarr.json"
108+
cd "${CLONE_DIR}"
109+
git add -A
110+
git commit -m "${{ github.ref_name }}"
111+
git push "${REPO}"

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
jobs:
7+
ci:
8+
uses: adamhl8/configs/.github/workflows/ci.yml@main

.github/workflows/release.yml

Lines changed: 4 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,9 @@
1-
name: Build and Release
2-
1+
name: Release
32
on:
4-
push:
5-
tags:
6-
- "v*"
7-
workflow_dispatch:
8-
3+
workflow_dispatch: {}
94
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
include:
15-
- target: bun-windows-x64
16-
artifact: inspectarr-windows-x64.exe
17-
- target: bun-darwin-x64
18-
artifact: inspectarr-macos-x64
19-
- target: bun-darwin-arm64
20-
artifact: inspectarr-macos-arm64
21-
- target: bun-linux-x64-musl
22-
artifact: inspectarr-linux-x64
23-
- target: bun-linux-arm64-musl
24-
artifact: inspectarr-linux-arm64
25-
26-
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v5
29-
30-
- name: Setup Bun
31-
uses: oven-sh/setup-bun@v2
32-
with:
33-
bun-version: latest
34-
35-
- name: Install dependencies
36-
run: bun install --production
37-
38-
- name: Build binary
39-
run: bun build --compile --sourcemap --target=${{ matrix.target }} --outfile=${{ matrix.artifact }} src/index.ts
40-
41-
- name: Upload artifact
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: ${{ matrix.artifact }}
45-
path: ${{ matrix.artifact }}
46-
475
release:
48-
needs: build
49-
# if: github.ref_type == 'tag'
50-
runs-on: ubuntu-latest
516
permissions:
527
contents: write
53-
54-
steps:
55-
- name: Checkout
56-
uses: actions/checkout@v5
57-
58-
- name: Setup Bun
59-
uses: oven-sh/setup-bun@v2
60-
with:
61-
bun-version: latest
62-
63-
- name: Download all artifacts
64-
uses: actions/download-artifact@v4
65-
with:
66-
path: ./artifacts
67-
68-
- name: Release
69-
uses: softprops/action-gh-release@v2
70-
with:
71-
files: |
72-
./artifacts/inspectarr-windows-x64.exe/inspectarr-windows-x64.exe
73-
./artifacts/inspectarr-macos-x64/inspectarr-macos-x64
74-
./artifacts/inspectarr-macos-arm64/inspectarr-macos-arm64
75-
./artifacts/inspectarr-linux-x64/inspectarr-linux-x64
76-
./artifacts/inspectarr-linux-arm64/inspectarr-linux-arm64
77-
78-
- name: Process package templates
79-
run: |
80-
bun ./package_templates/template-processor.ts "${GITHUB_REF_NAME#v}"
81-
82-
- name: Set up git
83-
run: |
84-
git config --global user.email adamhl@pm.me
85-
git config --global user.name "GitHub Actions"
86-
87-
- name: Update homebrew tap
88-
env:
89-
INSPECTARR_PACKAGE_TOKEN: ${{ secrets.INSPECTARR_PACKAGE_TOKEN }}
90-
run: |
91-
REPO="https://adamhl8:${INSPECTARR_PACKAGE_TOKEN}@github.com/adamhl8/homebrew-inspectarr.git"
92-
CLONE_DIR=$(mktemp -d)
93-
git clone --depth 1 "${REPO}" "${CLONE_DIR}"
94-
cp ./package_templates/homebrew/inspectarr.rb "${CLONE_DIR}/Formula/inspectarr.rb"
95-
cd "${CLONE_DIR}"
96-
git add -A
97-
git commit -m "${{ github.ref_name }}"
98-
git push "${REPO}"
99-
100-
- name: Update scoop bucket
101-
env:
102-
INSPECTARR_PACKAGE_TOKEN: ${{ secrets.INSPECTARR_PACKAGE_TOKEN }}
103-
run: |
104-
REPO="https://adamhl8:${INSPECTARR_PACKAGE_TOKEN}@github.com/adamhl8/scoop-inspectarr.git"
105-
CLONE_DIR=$(mktemp -d)
106-
git clone --depth 1 "${REPO}" "${CLONE_DIR}"
107-
cp ./package_templates/scoop/inspectarr.json "${CLONE_DIR}/inspectarr.json"
108-
cd "${CLONE_DIR}"
109-
git add -A
110-
git commit -m "${{ github.ref_name }}"
111-
git push "${REPO}"
8+
uses: adamhl8/configs/.github/workflows/release.yml@main
9+
secrets: inherit

.github/workflows/update-deps.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Update dependencies
2+
on:
3+
schedule:
4+
- cron: "0 13 * * 5" # Fridays, 13:00 UTC
5+
workflow_dispatch: {}
6+
jobs:
7+
update-deps:
8+
uses: adamhl8/configs/.github/workflows/update-deps.yml@main
9+
secrets: inherit

.release-it.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { releaseItConfig } from "@adamhl8/configs"
2+
3+
const config = releaseItConfig()
4+
5+
export default config

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 adamhl8
3+
Copyright (c) 2026 adamhl8
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

biome.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)