Skip to content

Commit

Permalink
feat: add the semver to the UI
Browse files Browse the repository at this point in the history
closes #10
  • Loading branch information
puria committed Dec 3, 2024
1 parent 944ed51 commit cd861a2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/setup-node@v3
with:
node-version: latest
- run: bun install
- run: bun add -g semantic-release
- run: bun add -D @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github
- name: Calculate release version
run: |
VERSION=$(npx semantic-release --dry-run --no-ci | grep -Po '(?<=The next release version is ).*')
echo "$VERSION" > VERSION
- run: bun run build
- run: cp dist/index.html pqspread.html
- uses: actions/upload-pages-artifact@v3
Expand All @@ -43,11 +52,6 @@ jobs:
subject-path: pqspread.html
- uses: actions/deploy-pages@v4
id: deployment
- run: bun add -g semantic-release
- run: bun add -D @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github
- uses: actions/setup-node@v3
with:
node-version: latest
- run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{
"assets": [
"CHANGELOG.md",
"VERSION"
],
"message": "chore(release): 🚀 ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.2.0
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
<div class="flex flex-col gap-4 max-w-7xl mx-auto">
<div class="flex items-baseline gap-2">
<h1
x-data="{ version: window.version }"
class="monospace text-3xl anim-text animate-text bg-gradient-to-r from-[#ca9ee6] via-[#e5c890] ] to-[#8caaee] bg-clip-text text-transparent font-black"
>
<a href="/"> PQSpread</a>
PQSpread <span class="text-xs" x-text="version"></span>
</h1>
<span class="text-xs">
kindly by
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import "./style.css";
import Alpine from "alpinejs";
import "./webcomponents.js";
import { download, LG, SC, SG, SS } from "./utils";
import version from "../VERSION?raw";

window.Download = download;
window.LG = LG;
window.SG = SG;
window.SC = SC;
window.SS = SS;
window.version = version;
window.Alpine = Alpine;
Alpine.start();

0 comments on commit cd861a2

Please sign in to comment.