Skip to content

Commit 8963216

Browse files
committed
Public release
1 parent f5ed7be commit 8963216

15 files changed

Lines changed: 636 additions & 1 deletion

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: p0dalirius
4+
patreon: Podalirius

.github/banner.png

19 KB
Loading

.github/example.png

101 KB
Loading

.github/example_debug.png

143 KB
Loading

.github/example_export_keys.png

103 KB
Loading

.github/openssl_rsa_pubin_text.png

162 KB
Loading
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Auto-prefix & Label Issues
2+
3+
on:
4+
issues:
5+
types: [opened, edited]
6+
7+
jobs:
8+
prefix_and_label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Ensure labels exist, then prefix titles & add labels
12+
uses: actions/github-script@v6
13+
with:
14+
script: |
15+
const owner = context.repo.owner;
16+
const repo = context.repo.repo;
17+
18+
// 1. Ensure required labels exist
19+
const required = [
20+
{ name: 'bug', color: 'd73a4a', description: 'Something isn\'t working' },
21+
{ name: 'enhancement', color: 'a2eeef', description: 'New feature or request' }
22+
];
23+
24+
// Fetch current labels in the repo
25+
const { data: existingLabels } = await github.rest.issues.listLabelsForRepo({
26+
owner, repo, per_page: 100
27+
});
28+
const existingNames = new Set(existingLabels.map(l => l.name));
29+
30+
// Create any missing labels
31+
for (const lbl of required) {
32+
if (!existingNames.has(lbl.name)) {
33+
await github.rest.issues.createLabel({
34+
owner,
35+
repo,
36+
name: lbl.name,
37+
color: lbl.color,
38+
description: lbl.description
39+
});
40+
console.log(`Created label "${lbl.name}"`);
41+
}
42+
}
43+
44+
// 2. Fetch all open issues
45+
const issues = await github.paginate(
46+
github.rest.issues.listForRepo,
47+
{ owner, repo, state: 'open', per_page: 100 }
48+
);
49+
50+
// 3. Keyword sets
51+
const enhancementWords = ["add", "added", "improve", "improved"];
52+
const bugWords = ["bug", "error", "problem", "crash", "failed", "fix", "fixed"];
53+
54+
// 4. Process each issue
55+
for (const issue of issues) {
56+
const origTitle = issue.title;
57+
const lower = origTitle.toLowerCase();
58+
59+
// skip if already prefixed
60+
if (/^\[(bug|enhancement)\]/i.test(origTitle)) continue;
61+
62+
let prefix, labelToAdd;
63+
if (enhancementWords.some(w => lower.includes(w))) {
64+
prefix = "[enhancement]";
65+
labelToAdd = "enhancement";
66+
} else if (bugWords.some(w => lower.includes(w))) {
67+
prefix = "[bug]";
68+
labelToAdd = "bug";
69+
}
70+
71+
if (prefix) {
72+
// update title
73+
await github.rest.issues.update({
74+
owner, repo, issue_number: issue.number,
75+
title: `${prefix} ${origTitle}`
76+
});
77+
console.log(`Prefixed title of #${issue.number}`);
78+
79+
// add label
80+
await github.rest.issues.addLabels({
81+
owner, repo, issue_number: issue.number,
82+
labels: [labelToAdd]
83+
});
84+
console.log(`Added label "${labelToAdd}" to #${issue.number}`);
85+
}
86+
}

.github/workflows/commit.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build on commit
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: Build Release Assets
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
os: [linux, windows, darwin]
16+
arch: [amd64, arm64, 386]
17+
binaryname: [FindReusedKeyCredentials]
18+
# Exclude incompatible couple of GOOS and GOARCH values
19+
exclude:
20+
- os: darwin
21+
arch: 386
22+
23+
env:
24+
GO111MODULE: 'on'
25+
CGO_ENABLED: '0'
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@v3
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v4
33+
with:
34+
go-version: '1.24.0'
35+
36+
- name: Build Binary
37+
env:
38+
GOOS: ${{ matrix.os }}
39+
GOARCH: ${{ matrix.arch }}
40+
run: |
41+
mkdir -p build
42+
OUTPUT_PATH="./build/${{ matrix.binaryname }}-${{ matrix.os }}-${{ matrix.arch }}"
43+
# Build the binary
44+
go build -ldflags="-s -w" -o $OUTPUT_PATH${{ matrix.os == 'windows' && '.exe' || '' }}

.github/workflows/release.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build Release Assets
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
os: [linux, windows, darwin]
15+
arch: [amd64, arm64, 386]
16+
binaryname: [FindReusedKeyCredentials]
17+
# Exclude incompatible couple of GOOS and GOARCH values
18+
exclude:
19+
- os: darwin
20+
arch: 386
21+
22+
env:
23+
GO111MODULE: 'on'
24+
CGO_ENABLED: '0'
25+
26+
steps:
27+
- name: Checkout Repository
28+
uses: actions/checkout@v3
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v4
32+
with:
33+
go-version: '1.24.0'
34+
35+
- name: Build Binary
36+
env:
37+
GOOS: ${{ matrix.os }}
38+
GOARCH: ${{ matrix.arch }}
39+
run: |
40+
mkdir -p build
41+
OUTPUT_PATH="./build/${{ matrix.binaryname }}-${{ matrix.os }}-${{ matrix.arch }}"
42+
# Build the binary
43+
go build -ldflags="-s -w" -o $OUTPUT_PATH${{ matrix.os == 'windows' && '.exe' || '' }}
44+
45+
- name: Prepare Release Assets
46+
if: ${{ success() }}
47+
run: |
48+
mkdir -p ./release/
49+
cp ./build/${{ matrix.binaryname }}-* ./release/
50+
51+
- name: Upload the Release binaries
52+
uses: svenstaro/upload-release-action@v2
53+
with:
54+
repo_token: ${{ secrets.GITHUB_TOKEN }}
55+
tag: ${{ github.ref }}
56+
file: ./release/${{ matrix.binaryname }}-*
57+
file_glob: true

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
# Dependency directories (remove the comment below to include it)
18+
# vendor/
19+
20+
# Go workspace file
21+
go.work
22+
go.work.sum
23+
24+
# env file
25+
.env
26+
27+
# Builds dir
28+
./bin/

0 commit comments

Comments
 (0)