Skip to content

✅ link protocol and run each pkg #28 #26

✅ link protocol and run each pkg #28

✅ link protocol and run each pkg #28 #26

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release to Npmjs
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
checks: write
steps:
- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Update or Release
id: changesets
uses: changesets/action@v1
with:
commit: ":bookmark: update versions"
title: ":rocket: release versions"
publish: pnpm publ
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release Report
id: report
run: |
# Get outputs from previous step
published='${{ steps.changesets.outputs.published }}'
publishedPackages='${{ steps.changesets.outputs.publishedPackages }}'
hasChangesets='${{ steps.changesets.outputs.hasChangesets }}'
pullRequestNumber='${{ steps.changesets.outputs.pullRequestNumber }}'
# Write to GitHub Summary
echo "Publishing Result:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- Published: $published" >> $GITHUB_STEP_SUMMARY
echo "- Has Changesets: $hasChangesets" >> $GITHUB_STEP_SUMMARY
echo "- Pull Request Number: $pullRequestNumber" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Published Packages:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Format published packages
echo "$publishedPackages" | jq -c '.[]' | while read pkg; do
name=$(echo $pkg | jq -r '.name')
version=$(echo $pkg | jq -r '.version')
echo "- Package: $name, Version: $version" >> $GITHUB_STEP_SUMMARY
done