Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Error

The if condition in the write-version-file job uses needs.release-please.outputs.release_created, but release_created is not guaranteed to be a valid output from the release-please action. Verify the output keys provided by googleapis/release-please-action@v4 and update the condition accordingly.

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
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
45 changes: 28 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
MIT License
GNU GENERAL PUBLIC LICENSE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning

The license has been changed from MIT to GPL-3. This is a significant change that affects the legal terms of the project. Ensure this change is intentional and has been communicated to all stakeholders.

Version 3, 29 June 2007

Copyright (c) 2021 Tapas Adhikary
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
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
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<h5 align="center">Welcome to</h5>
<h1 align="center">The Language Hub 👋</h1>
<p align='center'>
<img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" />
<!-- <a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" />
</a> -->
<!-- <img alt="Version" src="https://img.shields.io/badge/version-2.0.0-blue.svg?cacheSeconds=2592000" /> -->
<!-- Latest release including pre-releases -->
<!-- <img src="https://img.shields.io/github/v/release/Psypher1/the-language-hub?include_prereleases&style=flat-square" /> -->

<a href="https://github.com/Psypher1/the-language-hub/releases" target="_blank">
<img src="https://img.shields.io/github/v/release/Psypher1/the-language-hub?include_prereleases&style=flat-square"/>
</a>
<a href="#" target="_blank">
<img alt="License: GPL-3" src="https://img.shields.io/badge/License-GPL3-blue.svg" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion

The license badge has been updated to GPL-3. Ensure this change aligns with the project's new licensing terms and is consistent with the LICENSE file.

</a>
</p>
<p align="center">
<a href="https://github.com/Psypher1/the-language-hub/stargazers" target="blank">
<img src="https://img.shields.io/github/stars/Psypher1/the-language-hub?style=flat-square" alt="tryshape stars"/>
</a>
Expand Down
3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
allowBuilds:
Comment thread
Psypher1 marked this conversation as resolved.
esbuild: true
sharp: true
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
4 changes: 2 additions & 2 deletions src/content/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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,
};
50 changes: 50 additions & 0 deletions to-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Addding Docs
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion

The title contains a typo: 'Addding' should be corrected to 'Adding'.


### 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({
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion

The variable learCollection is defined here but appears to be a duplicate of the corrected learnCollection in src/content/config.js. Consider removing or updating this to avoid confusion.

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() }),
};
```
Loading