GitHub (AIK)
This template uses Github Actions and ships with Astro Integration Kit. Copy it locally by running the following command:
pnpm dlx giget@latest gh:florian-lefebvre/astro-integration-template/templates/github-kit my-integrationPrerequisites
Section titled “Prerequisites”Make sure you have a GitHub and NPM account.
-
Search for
TODO:and update them. -
Update all occurrences of
package-namewith your package name. -
Update .changeset/config.json with your organization’s repository name (org/repo-name).
-
Add a
LICENSEat the root (if you do it through GitHub interface, you’ll be able to see all licenses and pick the best one for your project). -
Pick the right NPM tags, see official docs.
-
Setup your GitHub repository.
-
Follow the the
e18epublishing guide. The release workflow is properly configured for OIDC publishing and is calledrelease.yml
Good practises
Section titled “Good practises”- Start working on your integration logic.
- Write some docs, either in the README or as a standalone docs website (not included in the template).
- Write good JSDoc annotations.
- Format and lint with
pnpm lint:fix.
Releasing
Section titled “Releasing”This template uses the GitHub Action for Changesets to automatically open a Pull Request to release a package. Once this Pull Request is merged, the package will be published to NPM.
-
Add a changeset and add a meaningful message:
Terminal window pnpm changesetYou can write several changesets if applicable.
-
Commit and push:
Terminal window git add .git commit -m "chore: changeset"git push -
The Changesets GitHub Action will automatically create a Pull Request for the release.
-
Review and merge the release Pull Request. Ensure you’re ready to publish the changes before merging.
-
The package will be published to NPM automatically throuh OIDC.