Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ permissions:
contents: write
pull-requests: write
packages: write
id-token: write

jobs:
release-please:
Expand All @@ -33,7 +34,7 @@ jobs:
with:
release-type: node

publish:
publish-gh:
needs: release-please
# Only run if a release was created and not in dry-run mode
if: needs.release-please.outputs.release_created && (github.event.inputs.dry_run != 'true')
Expand All @@ -60,10 +61,31 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Output published info
run: |
echo "✅ Published ${{ needs.release-please.outputs.tag_name }} to GitHub Packages"
echo "📦 Package: @architect-eng/sapatos@${{ needs.release-please.outputs.version }}"
publish-npmjs:
needs: release-please
# Only run if a release was created and not in dry-run mode
if: needs.release-please.outputs.release_created && (github.event.inputs.dry_run != 'true')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Remove publishConfig
run: npm pkg delete publishConfig

- run: npm ci

- run: npm run lint

- run: npm run build

- name: Publish to npmjs (with OIDC)
run: npm publish --access public --provenance

dry-run-summary:
needs: release-please
Expand All @@ -76,4 +98,5 @@ jobs:
echo "🧪 DRY RUN MODE - No packages published"
echo "📋 Would have published: ${{ needs.release-please.outputs.tag_name }}"
echo "📦 Package: @architect-eng/sapatos@${{ needs.release-please.outputs.version }}"
echo "🔄 Would publish to both GitHub Packages and npmjs"
echo "ℹ️ Merge the Release PR to trigger actual publication"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/architect-eng/sapatos"
"url": "git+https://github.com/architect-eng/sapatos.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
Expand Down