Skip to content

Commit 255db38

Browse files
authored
Initial commit
0 parents  commit 255db38

36 files changed

+3407
-0
lines changed

.dockerignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Folders
2+
.git
3+
.github
4+
.vscode
5+
dist
6+
docs
7+
node_modules
8+
9+
# Files
10+
.dockerignore
11+
.editorconfig
12+
.eslintignore
13+
.eslintrc.yaml
14+
.gitignore
15+
.prettierignore
16+
.prettierrc.yaml
17+
*.md
18+
*.test.ts
19+
*.tsbuildinfo
20+
*.txt
21+
Dockerfile
22+
tsconfig.eslint.json
23+
typedoc.json

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = tab
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.yaml]
12+
indent_style = space

.env

Whitespace-only changes.

.github/.markdownlint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
first-line-heading: false

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @NatoBoram

.github/FUNDING.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github:
2+
- NatoBoram
3+
patreon: NatoBoram
4+
custom:
5+
- https://paypal.me/NatoBoram/5

.github/authorized_keys

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
41898282+github-actions[bot]@users.noreply.github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE0nNJJzdXWCLFEqZd4BMgzbTfabG3Z2kamWwXOpRqBI 41898282+github-actions[bot]@users.noreply.github.com

.github/dependabot.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
timezone: America/Toronto
8+
commit-message:
9+
prefix: "⬆️ "
10+
groups:
11+
patch:
12+
update-types:
13+
- patch
14+
minor-development:
15+
update-types:
16+
- minor
17+
dependency-type: development
18+
minor-production:
19+
update-types:
20+
- minor
21+
dependency-type: production
22+
eslint:
23+
patterns:
24+
- "*eslint*"
25+
prettier:
26+
patterns:
27+
- "*prettier*"
28+
typescript:
29+
patterns:
30+
- "*typescript*"
31+
- tsx
32+
- typedoc
33+
34+
- package-ecosystem: github-actions
35+
directory: /
36+
schedule:
37+
interval: monthly
38+
timezone: America/Toronto
39+
commit-message:
40+
prefix: "⬆️ "

.github/pull_request_template.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Replace this by a short description under 60 characters -->
2+
3+
### 📝 Description
4+
5+
<!-- Why this pull request? -->
6+
7+
<!-- Why is this the best solution? -->
8+
9+
<!-- What you did -->
10+
11+
### 📓 References
12+
13+
<!-- A list of links to discussions, documentation, issues, pull requests -->

.github/workflows/docker.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Docker CI
2+
3+
on:
4+
push:
5+
branches: main
6+
tags: v*
7+
pull_request:
8+
branches: main
9+
10+
jobs:
11+
docker:
12+
runs-on: ubuntu-latest
13+
14+
if: github.actor != 'nektos/act'
15+
16+
permissions:
17+
packages: write
18+
contents: read
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: docker/login-action@v3
24+
if: github.actor != 'dependabot[bot]'
25+
with:
26+
username: ${{ vars.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
29+
- uses: docker/login-action@v3
30+
if: github.actor != 'dependabot[bot]'
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: |
40+
natoboram/gigachad.ts
41+
ghcr.io/${{ github.repository }}
42+
tags: |
43+
type=ref,event=tag
44+
type=semver,pattern={{major}}
45+
type=semver,pattern={{major}}.{{minor}}
46+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
47+
type=semver,pattern={{version}}
48+
49+
- uses: docker/build-push-action@v6
50+
with:
51+
context: .
52+
push: ${{ github.ref_type == 'tag' }}
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/github-pages.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
build_pages:
9+
runs-on: ubuntu-latest
10+
11+
if: github.actor != 'nektos/act'
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: latest
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: latest
21+
cache: pnpm
22+
- run: pnpm install
23+
- run: pnpm run docs
24+
- uses: actions/upload-pages-artifact@v3
25+
with:
26+
path: docs
27+
28+
deploy_pages:
29+
needs: build_pages
30+
31+
permissions:
32+
pages: write
33+
id-token: write
34+
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- id: deployment
43+
uses: actions/deploy-pages@v4

.github/workflows/node.js.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: main
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: latest
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: latest
21+
cache: pnpm
22+
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
23+
- run: pnpm run build --noEmit
24+
- run: pnpm run lint
25+
- run: pnpm run test run

.github/workflows/pnpm-publish.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Node.js Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: write # Upload the release files
14+
id-token: write # Add `--provenance`
15+
packages: write # Publish the package
16+
17+
if: github.actor != 'nektos/act'
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: pnpm/action-setup@v4
22+
with:
23+
version: latest
24+
- uses: actions/setup-node@v4
25+
with:
26+
cache: pnpm
27+
node-version: latest
28+
- run: pnpm install
29+
- run: pnpm build
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
registry-url: https://npm.pkg.github.com
34+
scope: "@natoboram"
35+
- run: pnpm publish --access public --no-git-checks --provenance
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
registry-url: https://registry.npmjs.org
42+
scope: "@natoboram"
43+
- run: pnpm publish --access public --no-git-checks --provenance
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
46+
47+
- run: pnpm pack --pack-gzip-level 9
48+
- name: Sign
49+
run: |
50+
eval `ssh-agent -s`
51+
ssh-add - <<< '${{ secrets.DEPLOY_KEY_PRIVATE }}'
52+
echo '${{ vars.DEPLOY_KEY_PUBLIC }}' > '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub'
53+
ssh-keygen -Y sign -f '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub' -n file natoboram-gigachad.ts-*.tgz
54+
ssh-keygen -Y verify -f ./.github/authorized_keys -I '41898282+github-actions[bot]@users.noreply.github.com' -n file -s natoboram-gigachad.ts-*.tgz.sig < natoboram-gigachad.ts-*.tgz
55+
- run: gh release upload ${{ github.ref_name }} natoboram-gigachad.ts-*.tgz natoboram-gigachad.ts-*.tgz.sig
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Node.js Patch
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
patch:
7+
runs-on: ubuntu-latest
8+
9+
permissions:
10+
contents: write
11+
12+
if: github.actor != 'nektos/act' && github.ref_name == 'main'
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
version: latest
21+
- uses: actions/setup-node@v4
22+
with:
23+
cache: pnpm
24+
node-version: latest
25+
- name: Configure Git, patch, release and push
26+
run: |
27+
git config user.name 'github-actions[bot]'
28+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
29+
30+
git config commit.gpgsign true
31+
git config gpg.format ssh
32+
git config push.gpgSign 'if-asked'
33+
git config tag.gpgSign true
34+
git config user.signingkey 'key::${{ vars.DEPLOY_KEY_PUBLIC }}'
35+
36+
eval `ssh-agent -s`
37+
ssh-add - <<< '${{ secrets.DEPLOY_KEY_PRIVATE }}'
38+
39+
VERSION=$(pnpm version patch --no-git-tag-version)
40+
41+
git commit --all --message "🔖 $VERSION"
42+
git tag --annotate --message "🔖 $VERSION" --sign $VERSION
43+
git push
44+
git push --tags
45+
46+
gh release create $VERSION --generate-notes --title $VERSION --verify-tag
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)