Skip to content
Open
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
22 changes: 2 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build

- name: Create release PR or publish to npm
- name: Create release PR or publish packages
id: changesets
uses: changesets/action@v1
with:
Expand All @@ -53,21 +52,4 @@ jobs:
title: 'chore(release): version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'

- name: Mirror published packages to GitHub Packages
if: steps.changesets.outputs.published == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
run: |
cat > .npmrc <<EOF
@reaatech:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
EOF
echo "$PUBLISHED_PACKAGES" | jq -r '.[].name' | while read -r name; do
dir="packages/${name#@reaatech/a2a-reference-}"
echo "Mirroring $name -> $dir"
(cd "$dir" && npm publish --registry=https://npm.pkg.github.com)
done
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
shamefully-hoist=false
strict-peer-dependencies=true
@reaatech:registry=https://npm.pkg.github.com
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"clean": "turbo run clean && rm -rf node_modules",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo run build && changeset publish"
"release": "printf 'registry=https://npm.pkg.github.com\\n//npm.pkg.github.com/:_authToken=%s\\n' \"$NPM_TOKEN\" > .npmrc && turbo run build && changeset publish"
},
"keywords": [
"a2a",
Expand Down