diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1afde87..5c33811 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @{{CODEOWNER}} +* @sheerlox diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index c880032..b4a42af 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -46,7 +46,7 @@ body: attributes: label: Your Environment description: Include as many relevant details about the environment you experienced the bug in - value: "- **`{{PACKAGE_NAME}}` version**: + value: "- **`semantic-release-hex` version**: - **NodeJS version**: diff --git a/.github/SECURITY.md b/.github/SECURITY.md index ab1b8f1..cafbf7b 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -4,15 +4,15 @@ **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report it at <{{SECURITY_POLICY_EMAIL}}>. +Instead, please report it at . Please encrypt your message to us using our PGP key. The key fingerprint is: ``` -{{SECURITY_POLICY_PGP_FINRGERPRINT}} +48D0 89FE8 FC01A 4E7E8 8EE96 1156 7DFA BCB9 256E ``` -The key is available from [{{SECURITY_POLICY_PGP_KEYSERVER}}]({{SECURITY_POLICY_PGP_URL}}). +The key is available from [keyserver.ubuntu.com](https://keyserver.ubuntu.com/pks/lookup?search=0x48D089FE8FC01A4E7E88EE9611567DFABCB9256E&fingerprint=on&op=index). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: @@ -31,4 +31,4 @@ We prefer all communications to be in English. ## Policy -`{{PACKAGE_NAME}}` follows the principle of [Coordinated Vulnerability Disclosure](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html#responsible-or-coordinated-disclosure). +`semantic-release-hex` follows the principle of [Coordinated Vulnerability Disclosure](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html#responsible-or-coordinated-disclosure). diff --git a/.releaserc b/.releaserc index 87197c1..5b35ff3 100644 --- a/.releaserc +++ b/.releaserc @@ -1,5 +1,5 @@ { - "repositoryUrl": "git@github.com:{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}.git", + "repositoryUrl": "git@github.com:talent-ideal/semantic-release-hex.git", "branches": [ "main" ], diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c526772..2345d75 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to {{PACKAGE_NAME}} +# Contributing to semantic-release-hex First off, thanks for taking the time to contribute! ❤️ @@ -6,7 +6,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: -> - Join the [Discord community]({{DISCORD_SERVER_URL}}) +> - Join the [Discord community](https://discord.gg/cRB8XRFKzH) > - Star the project > - Tweet about it > - Refer this project in your project's readme @@ -23,11 +23,11 @@ All types of contributions are encouraged and valued. See the [Table of Contents ## I Have a Question -> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}#readme). +> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/talent-ideal/semantic-release-hex#readme). -Before you ask a question, it is best to search for existing [Issues](https://github.com/search?q=repo%3A{{REPOSITORY_OWNER}}%2F{{REPOSITORY_NAME}}+&type=issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. +Before you ask a question, it is best to search for existing [Issues](https://github.com/search?q=repo%3Atalent-ideal%2Fsemantic-release-hex+&type=issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. -If you then still feel the need to ask a question and need clarification, we recommend you join the [Discord community]({{DISCORD_SERVER_URL}})! We will take care to answer you as soon as possible. +If you then still feel the need to ask a question and need clarification, we recommend you join the [Discord community](https://discord.gg/cRB8XRFKzH)! We will take care to answer you as soon as possible. ## I Want To Contribute @@ -42,8 +42,8 @@ If you then still feel the need to ask a question and need clarification, we rec A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. - Make sure that you are using the latest version. -- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}#readme). If you are looking for support, you might want to check [this section](#i-have-a-question)). -- Perform a [search](https://github.com/search?q=repo%3A{{REPOSITORY_OWNER}}%2F{{REPOSITORY_NAME}}+&type=issues) to see if the bug/error has already been reported. If it has, add a comment to the existing issue instead of opening a new one. +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/talent-ideal/semantic-release-hex#readme). If you are looking for support, you might want to check [this section](#i-have-a-question)). +- Perform a [search](https://github.com/search?q=repo%3Atalent-ideal%2Fsemantic-release-hex+&type=issues) to see if the bug/error has already been reported. If it has, add a comment to the existing issue instead of opening a new one. - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. - Collect information about the bug: - Stack trace (Traceback) @@ -56,7 +56,7 @@ A good bug report shouldn't leave others needing to chase you up for more inform We use GitHub issues to track bugs and errors. If you run into an issue with the project: -- Open a [Bug report issue](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/issues/new/choose). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) +- Open a [Bug report issue](https://github.com/talent-ideal/semantic-release-hex/issues/new/choose). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) - Explain the behavior you would expect and the actual behavior. - Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. - Provide the information you collected in the previous section. @@ -69,24 +69,24 @@ Once it's filed: ### Suggesting Enhancements -This section guides you through submitting an enhancement suggestion for `{{PACKAGE_NAME}}`, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. +This section guides you through submitting an enhancement suggestion for `semantic-release-hex`, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. #### Before Submitting an Enhancement - Make sure that you are using the latest version. -- Read the [documentation](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}#readme) carefully and find out if the functionality is already covered, maybe by an individual configuration. -- Perform a [search](https://github.com/search?q=repo%3A{{REPOSITORY_OWNER}}%2F{{REPOSITORY_NAME}}+&type=issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- Read the [documentation](https://github.com/talent-ideal/semantic-release-hex#readme) carefully and find out if the functionality is already covered, maybe by an individual configuration. +- Perform a [search](https://github.com/search?q=repo%3Atalent-ideal%2Fsemantic-release-hex+&type=issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. #### How Do I Submit a Good Enhancement Suggestion? -Enhancement suggestions are tracked as [GitHub issues](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/issues). +Enhancement suggestions are tracked as [GitHub issues](https://github.com/talent-ideal/semantic-release-hex/issues). -- Open a [Feature request issue](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/issues/new/choose). +- Open a [Feature request issue](https://github.com/talent-ideal/semantic-release-hex/issues/new/choose). - Use a **clear and descriptive title** for the issue to identify the suggestion. - Provide a **step-by-step description of the suggested enhancement** in as many details as possible. - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. -- **Explain why this enhancement would be useful** to most `{{PACKAGE_NAME}}` users. You may also want to point out the other projects that solved it better and which could serve as inspiration. +- **Explain why this enhancement would be useful** to most `semantic-release-hex` users. You may also want to point out the other projects that solved it better and which could serve as inspiration. ## Working with the code @@ -96,11 +96,11 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/{{REPO ```bash # Clone your fork of the repo into the current directory -$ git clone git@github.com:/{{REPOSITORY_NAME}}.git # or https://github.com//{{REPOSITORY_NAME}}.git for HTTPS +$ git clone git@github.com:/semantic-release-hex.git # or https://github.com//semantic-release-hex.git for HTTPS # Navigate to the newly cloned directory -$ cd {{REPOSITORY_NAME}} +$ cd semantic-release-hex # Assign the original repo to a remote called "upstream" -$ git remote add upstream git@github.com:{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}.git # or https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}.git for HTTPS +$ git remote add upstream git@github.com:talent-ideal/semantic-release-hex.git # or https://github.com/talent-ideal/semantic-release-hex.git for HTTPS # Install the dependencies $ npm install ``` @@ -135,7 +135,7 @@ $ npm run test ## Join The Project Team -This project is looking for help! If you're interested in helping with the project on a regular basis, please reach out to us on the [Discord community]({{DISCORD_SERVER_URL}}). +This project is looking for help! If you're interested in helping with the project on a regular basis, please reach out to us on the [Discord community](https://discord.gg/cRB8XRFKzH). ## Attribution diff --git a/LICENSE b/LICENSE index 24055df..e2a7e55 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) {{COPYRIGHT_YEAR}} {{COPYRIGHT_OWNER}} +Copyright (c) 2023 Talent Ideal 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: diff --git a/README.md b/README.md index b2d372d..2c2fda4 100644 --- a/README.md +++ b/README.md @@ -1,85 +1,29 @@ -# javascript-lib-template +# semantic-release-hex -[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/insurgent-lab/javascript-lib-template?label=openssf%20scorecard) -](https://securityscorecards.dev/viewer/?uri=github.com/insurgent-lab/javascript-lib-template) -[![Discord](https://img.shields.io/discord/1113785800329531473?logo=discord)](https://discord.gg/zsNC4Hqd6h) +> [**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to publish a [hex](https://hex.pm) package -A GitHub repository template for Open Source JavaScript libraries (ESM) following best practices. - -- Linting & formatting with [ESLint](https://eslint.org/) & [Prettier](https://prettier.io/) -- Testing with [Jest](https://jestjs.io/) -- Automated dependency updates with [Renovate Bot](https://www.mend.io/renovate-free/) -- Conventional commits with [`commitlint`](https://commitlint.js.org/#/) -- Automated version management, changelog generation and package publishing with [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) -- Code Quality, Security and Coverage with [SonarCloud](https://sonarcloud.io). -- Security score with [OSSF Scorecard](https://github.com/ossf/scorecard) -- issues/PR templates, code of conduct, contributing docs & security policy - -## Spinning up your repo (< 15 mins) - -- [create your repository from this template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template). -- find and replace those variables with the correct values: - -| Variable | Description | -| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `{{PACKAGE_NAME}}` | `npm` package name | -| `{{SHORT_DESCRIPTION}}` | short description of your library | -| `{{REPOSITORY_OWNER}}` | GitHub account owning the repository | -| `{{REPOSITORY_NAME}}` | repository name | -| `{{DISCORD_SERVER_ID}}` | [ID of your Discord community server](https://shields.io/badges/discord) | -| `{{DISCORD_SERVER_URL}}` | invite URL for your Discord community server | -| `{{AUTHOR_NAME}}` | author's name | -| `{{AUTHOR_EMAIL}}` | author's email | -| `{{AUTHOR_GITHUB_USERNAME}}` | author's GitHub account username | -| `{{COPYRIGHT_OWNER}}` | owner of the copyright | -| `{{COPYRIGHT_YEAR}}` | year of first publication | -| `{{CODEOWNER}}` | [GitHub user or team for `CODEOWNERS`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax) (without leading `@`) | -| `{{SONARCLOUD_PROJECT_KEY}}` | [SonarCloud](https://sonarcloud.io/projects) project key | -| `{{SECURITY_POLICY_EMAIL}}` | email that should be used to report security vulnerabilities | -| `{{SECURITY_POLICY_PGP_FINRGERPRINT}}` | fingerprint of the PGP key that should be used to report security vulnerabilities | -| `{{SECURITY_POLICY_PGP_KEYSERVER}}` | keyserver hosting your PGP key (e.g. `keyserver.ubuntu.com`) | -| `{{SECURITY_POLICY_PGP_URL}}` | full URL to access your PGP key on the keyserver (e.g. `https://keyserver.ubuntu.com/pks/lookup?search=0x...&fingerprint=on& op=index`) | - -- add some `keywords` in `package.json`. -- create and add the workflows secrets: - - [create a GitHub fine-grained token for the release pipeline](https://stackoverflow.com/a/76550826/5567941) and add it to your repository secrets as `CI_GITHUB_TOKEN`. - - [create a npm granular token for the package](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-granular-access-tokens-on-the-website) and add it to your repository secrets as `NPM_TOKEN`. - - [create a GitHub token for OSSF ScoreCard](https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md) and add it to your repository secrets as `SCORECARD_GITHUB_TOKEN`. - - [create a SonarCloud token](https://sonarcloud.io/account/security) and add it to your repository secrets as `SONAR_TOKEN`. -- [add the Renovate app to your repository](https://github.com/apps/renovate/installations/select_target). -- [add the Step Security app to your repository](https://github.com/apps/stepsecurity-actions-security) -- make sure you [enabled your Discord server's widget](https://shields.io/badges/discord) -- run `npm run lint:fix`. -- remove the `---` below and everything above it, commit changes, and you're good to go 🚀 - ---- - -# {{PACKAGE_NAME}} - -> {{SHORT_DESCRIPTION}} - -[![Version](https://img.shields.io/npm/v/{{PACKAGE_NAME}}?logo=npm)](https://www.npmjs.com/package/{{PACKAGE_NAME}}) -[![Build](https://img.shields.io/github/actions/workflow/status/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/release.yml?logo=github)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/actions/workflows/release.yml) -[![CodeQL](https://img.shields.io/github/actions/workflow/status/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/codeql.yml?logo=github&label=CodeQL)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/actions/workflows/codeql.yml) -[![Coverage](https://img.shields.io/sonar/coverage/{{SONARCLOUD_PROJECT_KEY}}?logo=sonarcloud&server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/summary/overall?id={{SONARCLOUD_PROJECT_KEY}}) -[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}?label=openssf%20scorecard) -](https://securityscorecards.dev/viewer/?uri=github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}) -[![Discord](https://img.shields.io/discord/{{DISCORD_SERVER_ID}}?logo=discord)]({{DISCORD_SERVER_URL}}) +[![Version](https://img.shields.io/npm/v/semantic-release-hex?logo=npm)](https://www.npmjs.com/package/semantic-release-hex) +[![Build](https://img.shields.io/github/actions/workflow/status/talent-ideal/semantic-release-hex/release.yml?logo=github)](https://github.com/talent-ideal/semantic-release-hex/actions/workflows/release.yml) +[![CodeQL](https://img.shields.io/github/actions/workflow/status/talent-ideal/semantic-release-hex/codeql.yml?logo=github&label=CodeQL)](https://github.com/talent-ideal/semantic-release-hex/actions/workflows/codeql.yml) +[![Coverage](https://img.shields.io/sonar/coverage/Talent-Ideal_semantic-release-hex?logo=sonarcloud&server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/summary/overall?id=Talent-Ideal_semantic-release-hex) +[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/talent-ideal/semantic-release-hex?label=openssf%20scorecard) +](https://securityscorecards.dev/viewer/?uri=github.com/talent-ideal/semantic-release-hex) +[![Discord](https://img.shields.io/discord/1158414767770308648?logo=discord)](https://discord.gg/cRB8XRFKzH) ## Installation -```console -npm install {{PACKAGE_NAME}} +```shell +npm install semantic-release-hex -D ``` ## Community -Join the [Discord server]({{DISCORD_SERVER_URL}})! Here you can discuss issues and get help in a more casual forum than GitHub. +Join the [Discord server](https://discord.gg/cRB8XRFKzH)! Here you can discuss issues and get help in a more casual forum than GitHub. ## Contributing -This project is looking for help! If you're interested in helping with the project, please take a look at our [contributing documentation](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/blob/main/CONTRIBUTING.md). +This project is looking for help! If you're interested in helping with the project, please take a look at our [contributing documentation](https://github.com/talent-ideal/semantic-release-hex/blob/main/CONTRIBUTING.md). ### Submitting Bugs/Issues -Please have a look at our [contributing documentation](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/blob/main/CONTRIBUTING.md), it contains all the information you need to know before submitting an issue. +Please have a look at our [contributing documentation](https://github.com/talent-ideal/semantic-release-hex/blob/main/CONTRIBUTING.md), it contains all the information you need to know before submitting an issue. diff --git a/package-lock.json b/package-lock.json index 8b1fa46..e2f6910 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "{{PACKAGE_NAME}}", - "version": "0.0.0", + "name": "semantic-release-hex", + "version": "0.0.0-alpha.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "{{PACKAGE_NAME}}", - "version": "0.0.0", + "name": "semantic-release-hex", + "version": "0.0.0-alpha.0", "license": "MIT", "devDependencies": { "@commitlint/cli": "18.2.0", diff --git a/package.json b/package.json index 88c882e..f20521c 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { - "name": "{{PACKAGE_NAME}}", - "description": "{{SHORT_DESCRIPTION}}", - "version": "0.0.0", - "author": "{{AUTHOR_NAME}} <{{AUTHOR_EMAIL}}> (https://github.com/{{AUTHOR_GITHUB_USERNAME}})", + "name": "semantic-release-hex", + "description": "semantic-release plugin to publish a hex package", + "version": "0.0.0-alpha.0", + "author": "Pierre Cavin (https://github.com/sheerlox)", "type": "module", "main": "lib/index.js", "types": "lib/index.d.ts", "license": "MIT", - "homepage": "https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}#readme", + "homepage": "https://github.com/talent-ideal/semantic-release-hex#readme", "repository": { "type": "git", - "url": "https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}.git" + "url": "https://github.com/talent-ideal/semantic-release-hex.git" }, "bugs": { - "url": "https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_NAME}}/issues" + "url": "https://github.com/talent-ideal/semantic-release-hex/issues" }, "scripts": { "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest", @@ -42,5 +42,12 @@ "files": [ "lib" ], - "keywords": [] + "keywords": [ + "hex", + "elixir", + "publish", + "registry", + "semantic-release", + "version" + ] } diff --git a/sonar-project.properties b/sonar-project.properties index b7f3e82..456774c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,3 @@ -sonar.projectKey={{SONARCLOUD_PROJECT_KEY}} +sonar.projectKey=Talent-Ideal_semantic-release-hex sonar.coverage.exclusions=tests/** sonar.javascript.lcov.reportPaths=./coverage/lcov.info