Skip to content

Commit 5390590

Browse files
chore: prepare 0.0.16 release
1 parent 56a74f2 commit 5390590

15 files changed

Lines changed: 46 additions & 787 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- name: Build package
3838
run: bun run build
3939

40+
# This is the only workflow that publishes the package to npm.
4041
- name: Publish to npm
4142
run: npm publish --provenance --access public
4243
working-directory: packages/astro-gravatar

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
fetch-depth: 0
2424
token: ${{ secrets.GITHUB_TOKEN }}
2525

26+
# This workflow prepares version/changelog metadata and release artifacts.
27+
# It does not publish to npm directly; tagged publishes happen in publish.yml.
2628
- name: Sampo Release
2729
id: sampo
2830
uses: bruits/sampo/crates/sampo-github-action@main

.sampo/changesets/add-oidc-publish-workflow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.sampo/changesets/fix-publish-workflow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ alwaysApply: false
3333
- Run coverage enforcement: `bun run test:coverage`
3434
- Build the package: `bun run build`
3535
- Preview publish contents: `cd packages/astro-gravatar && bun pm pack --dry-run`
36+
- Run full release checks: `bun run release:check`
37+
- Preview the next Sampo release: `bun run sampo:preview`
3638
- Build docs explicitly: `cd apps/astro-gravatar.and.guide && bun run build`
3739

3840
## Validation expectations
@@ -80,9 +82,11 @@ alwaysApply: false
8082

8183
- CI currently checks lint, formatting, typechecking, coverage, build, security audit, pack dry-run, and bundle size.
8284
- Coverage enforcement is implemented by `packages/astro-gravatar/package.json` plus `scripts/check-coverage.ts`.
85+
- `release.yml` prepares release metadata through Sampo. Treat it as release-prep automation, not the npm publish step.
8386
- Package publishing is tag-driven through `.github/workflows/publish.yml`.
8487
- The publish workflow uses `npm publish --provenance --access public` from `packages/astro-gravatar`.
8588
- Changes that affect the published package should usually include a Sampo release entry via `bun run sampo:add`.
89+
- The operational release sequence is: `bun run release:check` -> `bun run sampo:add` -> optional `bun run sampo:preview` -> `bun run sampo:release` -> review version/changelog -> push `v<version>` tag -> let `publish.yml` publish to npm.
8690

8791
## Documentation expectations
8892

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ bun run typecheck
9797
bun run test
9898
bun run test:coverage
9999
bun run build
100-
cd packages/astro-gravatar && bun pm pack --dry-run
100+
bun run release:check
101+
bun run sampo:add
102+
bun run sampo:preview
103+
bun run sampo:release
101104
```
102105

103106
## Documentation
@@ -110,12 +113,25 @@ cd packages/astro-gravatar && bun pm pack --dry-run
110113

111114
## Release workflow
112115

113-
This repo uses Bun for local validation and a tag-driven GitHub Actions workflow for npm publishing.
116+
This repo uses Bun for local validation, Sampo for release metadata preparation, and a tag-driven GitHub Actions workflow for actual npm publishing.
114117

115-
1. Run `bun run lint`, `bun run typecheck`, `bun run test`, and `bun run build`.
116-
2. Confirm publish output with `cd packages/astro-gravatar && bun pm pack --dry-run`.
118+
1. Run `bun run release:check`.
117119
3. Add a Sampo release entry when the published package changes: `bun run sampo:add`.
118-
4. Create and push a version tag like `v0.0.16` to trigger `.github/workflows/publish.yml`.
120+
4. Run `bun run sampo:preview` if you want to inspect the planned version bump before changing files.
121+
5. Run `bun run sampo:release` to consume pending release entries and update version/changelog metadata.
122+
6. Review the resulting package version and `packages/astro-gravatar/CHANGELOG.md`.
123+
7. Create and push a version tag like `v0.0.16` to trigger `.github/workflows/publish.yml`.
124+
125+
### Workflow responsibilities
126+
127+
- `.github/workflows/release.yml` prepares release metadata with Sampo when `main`, `beta`, or `alpha` changes.
128+
- `.github/workflows/publish.yml` is the only workflow that actually publishes to npm, and it runs only on `v*` tags using npm Trusted Publishing (OIDC).
129+
130+
### Astro directory listing
131+
132+
- `astro-gravatar` is published as an Astro component package, not an `astro add` integration.
133+
- After a new npm version is published, Astro's integrations/components directory can pick it up from npm metadata such as `name`, `description`, `homepage`, `repository`, and ecosystem keywords.
134+
- If the listing needs a custom avatar or metadata override after publish, open an issue with the Astro team using the live npm package as the source of truth.
119135

120136
## License
121137

apps/astro-gravatar.and.guide/astro.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import starlight from '@astrojs/starlight';
44

55
// https://astro.build/config
66
export default defineConfig({
7+
site: 'https://astro-gravatar.and.guide',
78
integrations: [
89
starlight({
910
title: 'Astro Gravatar',
1011
social: [
1112
{
1213
icon: 'github',
1314
label: 'GitHub',
14-
href: 'https://github.com/your-username/astro-gravatar',
15+
href: 'https://github.com/imjlk/astro-gravatar',
1516
},
1617
],
1718
sidebar: [

apps/astro-gravatar.and.guide/src/content/docs/guides/installation.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Get astro-gravatar installed and running in your Astro project.
99

1010
## Prerequisites
1111

12-
- Astro project (version 4.0 or higher)
13-
- Node.js 18+ or Bun
12+
- Astro project (version 4, 5, or 6)
13+
- Node.js 22.12+ or Bun
1414
- Package manager (npm, yarn, pnpm, or Bun)
1515

1616
## Install Package
@@ -96,7 +96,7 @@ TypeScript types are included automatically. No additional setup needed.
9696

9797
**Module not found error?**
9898

99-
- Ensure you're using Astro 4.0+
99+
- Ensure you're using a supported Astro version (`^4 || ^5 || ^6`)
100100
- Restart your development server
101101
- Check that `node_modules/astro-gravatar` exists
102102

apps/astro-gravatar.and.guide/src/content/docs/guides/troubleshooting.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ global.fetch = async function (url, options) {
401401

402402
### Community Resources
403403

404-
- **GitHub Issues**: [Report bugs and request features](https://github.com/your-username/astro-gravatar/issues)
405-
- **Discussions**: [Ask questions and share examples](https://github.com/your-username/astro-gravatar/discussions)
404+
- **GitHub Issues**: [Report bugs and request features](https://github.com/imjlk/astro-gravatar/issues)
405+
- **Discussions**: [Ask questions and share examples](https://github.com/imjlk/astro-gravatar/discussions)
406406
- **Gravatar Documentation**: [Official API docs](https://en.gravatar.com/site/implement/api/)
407407

408408
### Debug Information

0 commit comments

Comments
 (0)