From 54a735999c025e82293fe8795b39835cbf22a47d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Nov 2024 14:29:39 +0000 Subject: [PATCH] Update GitHub template files --- .changeset/README.md | 8 +++ .changeset/config.json | 14 +++++ .github/workflows/deployment.yaml | 16 +++++- .github/workflows/publish.yaml | 17 +++++- .prettierrc | 8 +++ LICENSE | 2 +- manifest/certificate.yaml | 2 +- manifest/deployment.yaml | 2 +- manifest/ingress.yaml | 6 +-- package.json | 70 +++++++++++++------------ packages/starlight-view-modes/README.md | 2 +- pnpm-workspace.yaml | 4 +- 12 files changed, 107 insertions(+), 44 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .prettierrc diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..263ec5a --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", + "changelog": [ + "@changesets/changelog-github", + { "repo": "trueberryless-org/starlight-view-modes" } + ], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 6b39673..7ac10b7 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -179,10 +179,24 @@ jobs: tag: ${{ env.IMAGE_NAME }}-docs@${{ needs.image-tag.outputs.IMAGE_TAG }} makeLatest: true body: ${{ steps.extract-changelog.outputs.markdown }} + skipIfReleaseExists: true + + - name: Check if release was created + id: check_release + run: | + if [ -z "${{ steps.create_release.outputs.html_url }}" ]; then + echo "RELEASE_SKIPPED=true" >> $GITHUB_ENV + else + echo "RELEASE_SKIPPED=false" >> $GITHUB_ENV + fi - name: Discord notification + if: env.RELEASE_SKIPPED == 'false' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} uses: Ilshidur/action-discord@0.3.2 with: - args: "# ${{ env.IMAGE_NAME }}-docs@${{ needs.image-tag.outputs.IMAGE_TAG }}\n\n${{ steps.extract-changelog.outputs.markdown }}" + args: | + # ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }} + + ${{ steps.extract-changelog.outputs.markdown }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2364781..aba1914 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -136,14 +136,29 @@ jobs: pattern: ${{ needs.image-tag.outputs.IMAGE_TAG }} - uses: ncipollo/release-action@v1 + id: create_release with: tag: ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }} makeLatest: true body: ${{ steps.extract-changelog.outputs.markdown }} + skipIfReleaseExists: true + + - name: Check if release was created + id: check_release + run: | + if [ -z "${{ steps.create_release.outputs.html_url }}" ]; then + echo "RELEASE_SKIPPED=true" >> $GITHUB_ENV + else + echo "RELEASE_SKIPPED=false" >> $GITHUB_ENV + fi - name: Discord notification + if: env.RELEASE_SKIPPED == 'false' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} uses: Ilshidur/action-discord@0.3.2 with: - args: "# ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }}\n\n${{ steps.extract-changelog.outputs.markdown }}" + args: | + # ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }} + + ${{ steps.extract-changelog.outputs.markdown }} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2bdf5f7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": true, + "singleQuote": false, + "endOfLine": "lf", + "htmlWhitespaceSensitivity": "css" +} diff --git a/LICENSE b/LICENSE index e85d40a..380ce44 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 trueberryless +Copyright (c) 2024-present, trueberryless Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/manifest/certificate.yaml b/manifest/certificate.yaml index 7ab9b79..ce46be3 100644 --- a/manifest/certificate.yaml +++ b/manifest/certificate.yaml @@ -9,4 +9,4 @@ spec: name: acme-issuer kind: ClusterIssuer dnsNames: - - 'starlight-view-modes.trueberryless.org' + - "starlight-view-modes.trueberryless.org" diff --git a/manifest/deployment.yaml b/manifest/deployment.yaml index 95aeea2..10884cd 100644 --- a/manifest/deployment.yaml +++ b/manifest/deployment.yaml @@ -17,5 +17,5 @@ spec: spec: containers: - name: starlight-view-modes - image: 'trueberryless/starlight-view-modes:main-59fd3a1cf21fb7a227f700d021f7f78e582d21fb' + image: "trueberryless/starlight-view-modes" imagePullPolicy: Always diff --git a/manifest/ingress.yaml b/manifest/ingress.yaml index 4228096..f4fa4c5 100644 --- a/manifest/ingress.yaml +++ b/manifest/ingress.yaml @@ -17,6 +17,6 @@ spec: number: 80 tls: - - hosts: - - starlight-view-modes.trueberryless.org - secretName: starlight-view-modes + - hosts: + - starlight-view-modes.trueberryless.org + secretName: starlight-view-modes diff --git a/package.json b/package.json index 3a53a57..d7e6ea0 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,39 @@ { - "name": "starlight-view-modes", - "author": "trueberryless (https://trueberryless.org)", - "version": "0.1.0", - "license": "MIT", - "description": "Starlight plugin adding view mode capabilities to your documentation website.", - "type": "module", - "scripts": {}, - "devDependencies": { - "typescript": "5.4.2" - }, - "engines": { - "node": ">=18" - }, - "packageManager": "pnpm@9.3.0", - "private": true, - "sideEffects": false, - "keywords": [ - "starlight", - "plugin", - "zen", - "view", - "mode", - "zen-mode", - "view-modes", - "documentation" - ], - "homepage": "https://starlight-view-modes.trueberryless.org", - "repository": { - "type": "git", - "url": "https://github.com/trueberryless/starlight-view-modes.git", - "directory": "packages/starlight-view-modes" - }, - "bugs": "https://github.com/trueberryless/starlight-view-modes/issues" + "name": "starlight-view-modes", + "version": "0.1.0", + "private": true, + "description": "Starlight plugin adding view mode capabilities to your documentation website.", + "keywords": [ + "starlight", + "plugin", + "zen", + "view", + "mode", + "zen-mode", + "view-modes", + "documentation" + ], + "homepage": "https://starlight-view-modes.trueberryless.org", + "bugs": "https://github.com/trueberryless/starlight-view-modes/issues", + "repository": { + "type": "git", + "url": "https://github.com/trueberryless/starlight-view-modes.git", + "directory": "packages/starlight-view-modes" + }, + "license": "MIT", + "author": "trueberryless (https://trueberryless.org)", + "sideEffects": false, + "type": "module", + "scripts": { + "version": "pnpm changeset version && pnpm i --no-frozen-lockfile" + }, + "devDependencies": { + "@changesets/changelog-github": "^0.5.0", + "@changesets/cli": "^2.27.9", + "typescript": "5.4.2" + }, + "packageManager": "pnpm@9.6.0", + "engines": { + "node": ">=18" + } } diff --git a/packages/starlight-view-modes/README.md b/packages/starlight-view-modes/README.md index b3fc868..373f89d 100644 --- a/packages/starlight-view-modes/README.md +++ b/packages/starlight-view-modes/README.md @@ -31,6 +31,6 @@ A [Starlight](https://starlight.astro.build) plugin adding view mode capabilitie ## License -Licensed under the MIT license, Copyright © trueberryless-org. +Licensed under the MIT license, Copyright © trueberryless. See [LICENSE](/LICENSE) for more information. diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 05395de..df1d4eb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - - "docs" - - "packages/**/*" + - "docs/" + - "packages/*"