From 664591d4db58dd0a83c5ff55cf5c588039bb6e68 Mon Sep 17 00:00:00 2001 From: Dante Date: Sun, 17 May 2026 20:06:46 +0200 Subject: [PATCH 1/2] fix: update readme, add realease workflow --- .release-please-manifest.json | 3 +++ LICENSE | 45 ++++++++++++++++++++++------------- README.md | 16 +++++++++---- pnpm-workspace.yaml | 3 +++ release-please-config.json | 11 +++++++++ 5 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 pnpm-workspace.yaml create mode 100644 release-please-config.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/LICENSE b/LICENSE index a030700..61c2693 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,32 @@ -MIT License +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 -Copyright (c) 2021 Tapas Adhikary +Copyright (C) 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Preamble -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The GNU General Public License is a free, copyleft license for +software and other kinds of works. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. When we speak of free software, we are +referring to freedom, not price. Our General Public Licenses are +designed to make sure that you have the freedom to distribute copies of +free software (and charge for them if you wish), that you receive +source code or can get it if you want it, that you can change the +software or use pieces of it in new free programs, and that you know +you can do these things. + +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive diff --git a/README.md b/README.md index d35341d..b039e37 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@
Welcome to

The Language Hub 👋

- Version - + + + + + + + + + License: GPL-3 + +

+

tryshape stars diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..dbb26c8 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +allowBuilds: + esbuild: true + sharp: true diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..d025d39 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "simple", + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true + } + } +} From d672baa13b914ef98b71ae504fc41fca216891f1 Mon Sep 17 00:00:00 2001 From: Dante Date: Sun, 17 May 2026 20:07:52 +0200 Subject: [PATCH 2/2] fix: comfilcts --- .github/workflows/release.yml | 61 +++++++++++++++++++++++++++++++++++ src/content/config.js | 4 +-- to-do.md | 50 ++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 to-do.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e87cfa3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Release + +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +jobs: + # ────────────────────────────────────────────────────────────── + # Job 1: Let release-please analyse commits and manage the + # Release PR. On merge it creates the tag + GH release. + # ────────────────────────────────────────────────────────────── + release-please: + name: Release Please + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + version: ${{ steps.release.outputs.version }} + + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + # Reads release-please-config.json for full configuration. + # No extra inputs needed here — keep the config in the repo. + token: ${{ secrets.GITHUB_TOKEN }} + + # ────────────────────────────────────────────────────────────── + # Job 2: After a real release is created, write the VERSION file + # so any build step / server can read it at runtime. + # ────────────────────────────────────────────────────────────── + write-version-file: + name: Write VERSION file + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + runs-on: ubuntu-latest + + steps: + - name: Checkout main + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ref: main + + - name: Update VERSION + run: echo "${{ needs.release-please.outputs.version }}" > VERSION + + - name: Commit & push + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add VERSION + # Only commit if the file actually changed (idempotent) + git diff --staged --quiet || \ + git commit -m "chore: bump VERSION to ${{ needs.release-please.outputs.version }} [skip ci]" + git push diff --git a/src/content/config.js b/src/content/config.js index 8ccc85c..49aa3ba 100644 --- a/src/content/config.js +++ b/src/content/config.js @@ -2,7 +2,7 @@ import { defineCollection, z } from "astro:content"; // 2. Define your collection(s) -const learCollection = defineCollection({ +const learnCollection = defineCollection({ type: "content", schema: z.object({ title: z.string(), @@ -16,5 +16,5 @@ const learCollection = defineCollection({ // 3. Export a single `collections` object to register your collection(s) // This key should match your collection directory name in "src/content" export const collections = { - learn: learCollection, + learn: learnCollection, }; diff --git a/to-do.md b/to-do.md new file mode 100644 index 0000000..c73cdf0 --- /dev/null +++ b/to-do.md @@ -0,0 +1,50 @@ +# Addding Docs + +### install starlight + +```sh +pnpm add @astrojs/starlight@0.32.0 +``` + +## configure astro config + +```js +import { defineConfig } from "astro/config"; +import tailwind from "@astrojs/tailwind"; +import icon from "astro-icon"; +import starlight from "@astrojs/starlight"; + +export default defineConfig({ + integrations: [ + starlight({ + title: "The Language Hub Docs", + routeBasePath: "/docs", + }), + tailwind(), + icon(), + ], +}); +``` + +## content config + +```js +import { defineCollection, z } from "astro:content"; +import { docsSchema } from "@astrojs/starlight/schema"; + +const learCollection = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + description: z.string(), + topic: z.string().optional(), + part: z.number().optional(), + live: z.boolean().default(false), + }), +}); + +export const collections = { + learn: learCollection, + docs: defineCollection({ schema: docsSchema() }), +}; +```