Skip to content

Commit bc400e8

Browse files
author
Murage
authored
Merge pull request #2 from murage-poc/main
Feat: redoing first release all over again!
2 parents d413a32 + 99e84d5 commit bc400e8

21 files changed

+3492
-1
lines changed
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
push:
3+
branches:
4+
- release
5+
6+
jobs:
7+
semantic_release:
8+
runs-on:
9+
- ubuntu-latest
10+
11+
steps:
12+
- name: Set up git
13+
env:
14+
GH_TOKEN: ${{ github.token }}
15+
run: |
16+
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
17+
git config --global user.name "${GITHUB_ACTOR}"
18+
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
fetch-tags: false
23+
24+
- name: Set up pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
run_install: false
28+
29+
- name: Set up Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: 'package.json'
33+
cache: 'pnpm'
34+
35+
- name: Install dependencies # Install only the dependencies required for the release which are at root.
36+
run: pnpm install --workspace-root --prod=false
37+
38+
- name: Run automated version
39+
run: pnpm run release
40+
env:
41+
RELEASE_SCM_BASE: ${{github.event.before}} # the base is commit before merge

apps/countopia/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

apps/countopia/.release-it.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
module.exports = require('@kala/release-it-config');

apps/countopia/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Countopia|Home</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<div id="app">
11+
<h1>Counter: <span id="counter">0</span></h1>
12+
<button id="increment">Increment</button>
13+
<button id="decrement">Decrement</button>
14+
<button id="reset">Reset</button>
15+
</div>
16+
<script type="module" src="/src/main.ts"></script>
17+
</body>
18+
</html>

apps/countopia/package.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "countopia",
3+
"description": "A simple vite project",
4+
"private": true,
5+
"version": "1.0.0",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite",
9+
"build": "tsc && vite build",
10+
"preview": "vite preview",
11+
"release": "release-it --ci"
12+
},
13+
"devDependencies": {
14+
"@kala/release-it-config": "workspace:*",
15+
"typescript": "~5.6.2",
16+
"vite": "^5.4.9"
17+
}
18+
}

apps/countopia/readme.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Countopia
2+
3+
A simple counter app built with Vite and TypeScript; where counting never stops.
4+
5+
6+
### How to set up development environment
7+
1. Install the dependencies
8+
```shell
9+
pnpm install
10+
```
11+
12+
2. Start the development server
13+
```shell
14+
pnpm run dev
15+
```
16+

apps/countopia/src/main.ts

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import './style.css'
2+
// src/main.ts
3+
4+
let count: number = 0;
5+
6+
const counterDisplay: HTMLElement | null = document.getElementById('counter');
7+
const incrementButton: HTMLElement | null = document.getElementById('increment');
8+
const decrementButton: HTMLElement | null = document.getElementById('decrement');
9+
const resetButton: HTMLElement | null = document.getElementById('reset');
10+
11+
function updateDisplay(): void {
12+
if (counterDisplay) {
13+
counterDisplay.textContent = count.toString();
14+
}
15+
}
16+
17+
incrementButton?.addEventListener('click', () => {
18+
count++;
19+
updateDisplay();
20+
});
21+
22+
decrementButton?.addEventListener('click', () => {
23+
count--;
24+
updateDisplay();
25+
});
26+
27+
resetButton?.addEventListener('click', () => {
28+
count = 0;
29+
updateDisplay();
30+
});
31+
32+
// Initialize the display
33+
updateDisplay();

apps/countopia/src/style.css

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
:root {
2+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3+
line-height: 1.5;
4+
font-weight: 400;
5+
6+
color-scheme: light dark;
7+
color: rgba(255, 255, 255, 0.87);
8+
background-color: #625f5fbf;
9+
10+
font-synthesis: none;
11+
text-rendering: optimizeLegibility;
12+
-webkit-font-smoothing: antialiased;
13+
-moz-osx-font-smoothing: grayscale;
14+
}
15+
16+
17+
body {
18+
margin: 0;
19+
display: flex;
20+
place-items: center;
21+
min-width: 320px;
22+
min-height: 100vh;
23+
}
24+
25+
26+
#app {
27+
max-width: 1280px;
28+
margin: 0 auto;
29+
padding: 2rem;
30+
text-align: center;
31+
border-radius: 10px;
32+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
33+
34+
}
35+
36+
37+
button {
38+
border-radius: 8px;
39+
border: 1px solid transparent;
40+
padding: 0.6em 1.2em;
41+
font-size: 1em;
42+
font-weight: 500;
43+
font-family: inherit;
44+
background-color: #1a1a1a;
45+
cursor: pointer;
46+
transition: border-color 0.25s;
47+
}
48+
49+
button:hover {
50+
border-color: #646cff;
51+
}
52+
53+
button:focus,
54+
button:focus-visible {
55+
outline: 4px auto -webkit-focus-ring-color;
56+
}
57+
58+
@media (prefers-color-scheme: light) {
59+
:root {
60+
color: #213547;
61+
background-color: #ffffff;
62+
}
63+
64+
button {
65+
background-color: #f9f9f9;
66+
}
67+
}

apps/countopia/src/vite-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

apps/countopia/tsconfig.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "Bundler",
11+
"allowImportingTsExtensions": true,
12+
"isolatedModules": true,
13+
"moduleDetection": "force",
14+
"noEmit": true,
15+
16+
/* Linting */
17+
"strict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noUncheckedSideEffectImports": true
22+
},
23+
"include": ["src"]
24+
}

apps/quote-oasis/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea/
2+
.vscode/
3+
venv
4+
.env
5+
__pycache__
6+
7+
*.pyc
8+
*.pyo
9+
*.pyd

apps/quote-oasis/.release-it.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
module.exports = require('@kala/release-it-config');

apps/quote-oasis/app.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import random
2+
from flask import Flask
3+
4+
app = Flask(__name__)
5+
6+
7+
quotes = [
8+
"The best way to predict the future is to invent it.",
9+
"Life is what happens when you're busy making other plans.",
10+
"You only live once, but if you do it right, once is enough.",
11+
"In the end, we will remember not the words of our enemies, but the silence of our friends.",
12+
"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.",
13+
]
14+
15+
16+
@app.route("/")
17+
def home():
18+
quote = random.choice(quotes)
19+
# Probably add bell and whistles to the quote here 😋😋
20+
return quote
21+
22+
23+
if __name__ == "__main__":
24+
app.run(debug=True)

apps/quote-oasis/package.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "quote-oasis",
3+
"version": "1.0.0",
4+
"description": "Dive into world of random quotes",
5+
"type": "module",
6+
"scripts": {
7+
"preinstall": "python3 -m venv venv",
8+
"install": "source venv/bin/activate && pip install -r requirements.txt",
9+
"dev": "source venv/bin/activate && python app.py",
10+
"release": "release-it --ci"
11+
},
12+
"license": "MIT",
13+
"devDependencies": {
14+
"@kala/release-it-config": "workspace:*"
15+
}
16+
}

apps/quote-oasis/readme.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Quote Oasis
2+
3+
A simple web application built with **Flask** that returns a random quote each time the page is visited.
4+
5+
This project showcases how release-it can be used with non-JavaScript apps.
6+
7+
## Prerequisites
8+
- Python 3.12 (ensure `python3` is in your path)
9+
10+
### Setting Up Local Development Environment (Easier Way)
11+
1. Install dependencies if not done yet:
12+
```shell
13+
pnpm install
14+
```
15+
This will create a virtual environment and install dependencies.
16+
17+
2. Start the local development server:
18+
```shell
19+
pnpm run dev
20+
```
21+
22+
### Setting Up Local Development Environment (Long Version)
23+
1. Create a virtual environment if it does not exist:
24+
```shell
25+
python3 -m venv ./venv
26+
```
27+
28+
2. Activate the virtual environment:
29+
```shell
30+
source ./venv/bin/activate
31+
```
32+
Use the same shell for the following commands.
33+
34+
3. Install the project requirements:
35+
```shell
36+
pip install -r requirements.txt
37+
```
38+
39+
4. Start the server:
40+
```shell
41+
python app.py
42+
```

apps/quote-oasis/requirements.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
blinker==1.8.2
2+
click==8.1.7
3+
Flask==3.0.3
4+
importlib_metadata==8.5.0
5+
itsdangerous==2.2.0
6+
Jinja2==3.1.4
7+
MarkupSafe==3.0.2
8+
Werkzeug==3.0.4
9+
zipp==3.20.2

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"type": "module",
66
"description": "People will come for miles to see you burn",
77
"scripts": {
8+
"release": "pnpm --recursive --workspace-concurrency 1 release"
89
},
910
"keywords": [],
10-
"license": "MIT"
11+
"license": "MIT",
12+
"packageManager": "[email protected]+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e",
13+
"devDependencies": {
14+
"@release-it/conventional-changelog": "^9.0.1",
15+
"release-it": "^17.10.0"
16+
}
1117
}

0 commit comments

Comments
 (0)