MCP Helius
by dcSpark
- mcp-server-helius
- .github
- workflows
name: Publish to NPM
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Get release branch
id: get_branch
run: |
RELEASE_BRANCH=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}" \
| jq -r .target_commitish)
echo "branch=$RELEASE_BRANCH" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ steps.get_branch.outputs.branch }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Update package version
run: |
RELEASE_VERSION=${GITHUB_REF#refs/tags/v}
CURRENT_VERSION=$(node -p "require('./package.json').version")
if [ "$RELEASE_VERSION" != "$CURRENT_VERSION" ]; then
npm version $RELEASE_VERSION --no-git-tag-version
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "chore: update package version to $RELEASE_VERSION [skip ci]"
git push origin ${{ steps.get_branch.outputs.branch }}
fi
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}