You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install the following dependencies: semantic-releae, @semantic-release/commit-analyzer, @semantic-release/npm, @semantic-release/github, husky and lint-staged (see notes below)
"lint": "prettier --check . && eslint .",
"lint-staged": "lint-staged",
"format": "prettier --write .",
// setup husky"prepare": "husky",
// ensure everyone has commit hooks set up"postinstall": "pnpm run prepare",
// actual semantic-release script "release": "semantic-release"
Add the following to `.husky/pre-commit'
#!/bin/sh."$(dirname "$0")/_/husky.sh"# dlx downloads "lint-staged" every time, resulting in long commit delays# when internet connection is slow# Solution: Install as dev dependency and run as target from package.json instead
pnpm run lint-staged
Add the following to Github actions (further configuration for repository permissions is required)
- name: Releaseenv:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}# Publishing to NPM is not necessary for websites# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}run: pnpm run release
Further details
Explanation
This request is augmenting the Github pages composer.
As a note ahead, the formatting and linting might be a seperate composer. It is just how I did it.
Setting up a Continuous Integration, Delivery and Deployment pipeline can take several hours per repository.
Using Conventional Commits and semantic-release can help to fully automated the process, including
automated semantic versioning
tagging in Git
publishing a release to npm or Github pages
Release notes on Github
The composer should take over additional tasks to ensure a consistent and productive development experience:
check format of commit messages using husky
Lint and fix any changed files using lint-staged for consistent formatting using prettier (shipped with sveltekit)
Options
Ask for
github and npm plug-ins of semantic-releae
ask for lint-staged, and husky
Configure Github Actions
The Github Actions are already configured to build and deploy the project to Github Pages.
Therefor you need to set two permissions in the settings of your repository:
In your browser, open the repository settings
Go to the Actions section
In the Workflow permissions, select Read and write permissions
Check Allow GitHub Actions to create and approve pull requests
The text was updated successfully, but these errors were encountered:
Website
https://semantic-release.gitbook.io/semantic-release
Documentation
https://semantic-release.gitbook.io/semantic-release
Integration summary
semantic-releae
,@semantic-release/commit-analyzer
,@semantic-release/npm
,@semantic-release/github
,husky
andlint-staged
(see notes below)package.json
and the following section:package.json
:Further details
Explanation
This request is augmenting the Github pages composer.
As a note ahead, the formatting and linting might be a seperate composer. It is just how I did it.
Setting up a Continuous Integration, Delivery and Deployment pipeline can take several hours per repository.
Using Conventional Commits and
semantic-release
can help to fully automated the process, includingThe composer should take over additional tasks to ensure a consistent and productive development experience:
husky
lint-staged
for consistent formatting usingprettier
(shipped with sveltekit)Options
Ask for
Configure Github Actions
The Github Actions are already configured to build and deploy the project to Github Pages.
Therefor you need to set two permissions in the settings of your repository:
The text was updated successfully, but these errors were encountered: