Skip to content

Add release automation and npm package metadata - #123

Draft
AdrianOrlow wants to merge 1 commit into
mainfrom
codex/fix-issue-102-and-create-pr
Draft

Add release automation and npm package metadata#123
AdrianOrlow wants to merge 1 commit into
mainfrom
codex/fix-issue-102-and-create-pr

Conversation

@AdrianOrlow

Copy link
Copy Markdown
Member

Motivation

  • Automate publishing the built library to npm on pushes to main and provide a predictable package layout and versioning for consumers.
  • Ensure the built JS, type declarations and CSS are exported from the package so consumers can import components and styles from @gi-org-pl/athena.

Description

  • Add GitHub Actions workflow .github/workflows/release.yml that installs deps, builds, prepares a release version, and runs npm publish using NODE_AUTH_TOKEN on pushes to main.
  • Add scripts/set-release-version.mjs which sets package.json to a unique 0.0.0-main.<run>.<attempt> version using GitHub Actions run metadata.
  • Update package.json to publish as @gi-org-pl/athena, expose ./dist/athena.js, ./dist/main.d.ts and ./dist/athena.css via exports, add files/publishConfig/repository metadata, and add the release:version script.
  • Include the compiled CSS in the library entry by importing ./index.css in src/main.ts and document installation/usage in README.md.

Testing

  • Ran npm run build which produced dist/athena.js, dist/athena.css, and dist/main.d.ts (succeeded).
  • Ran lint via npm run lint (calls npx @biomejs/biome lint) and it completed with no issues (succeeded).
  • Ran GITHUB_RUN_NUMBER=123 GITHUB_RUN_ATTEMPT=2 npm run release:version to verify version generation and it printed the prepared package version (succeeded).
  • Ran npm pack --dry-run to validate the packaged files list and tarball metadata (succeeded).

Codex Task

@github-actions

Copy link
Copy Markdown

Coverage Report

Coverage after merging codex/fix-issue-102-and-create-pr into main will be:

Hit/ Total Coverage
🟰 Statements 335 / 335 100% 🥳
🌿 Branches 412 / 412 100% 🥳
🔢 Functions 87 / 87 100% 🥳
📝 Elements 834 / 834 100% 🥳

@AdrianOrlow AdrianOrlow self-assigned this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant