-
Notifications
You must be signed in to change notification settings - Fork 2
Chore/add release #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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' | ||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "0.1.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,32 @@ | ||
| MIT License | ||
| GNU GENERAL PUBLIC LICENSE | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| 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" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| allowBuilds: | ||
|
Psypher1 marked this conversation as resolved.
|
||
| esbuild: true | ||
| sharp: true | ||
| 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 | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Addding Docs | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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({ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Suggestion The variable |
||
| 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() }), | ||
| }; | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Error
The
ifcondition in thewrite-version-filejob usesneeds.release-please.outputs.release_created, butrelease_createdis not guaranteed to be a valid output from therelease-pleaseaction. Verify the output keys provided bygoogleapis/release-please-action@v4and update the condition accordingly.