Skip to content
name: Build server for release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-server:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Checkout
uses: actions/checkout@v4
- name:
uses: bufbuild/buf-setup-action@v1
with:
version: latest
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "9"
- name: Build and publish
run: |

Check failure on line 36 in .github/workflows/release-please.yml

View workflow run for this annotation

GitHub Actions / Build server for release

Invalid workflow file

The workflow is not valid. .github/workflows/release-please.yml (Line: 36, Col: 14): Unrecognized named-value: 'GITHUB_SHA'. Located at position 1 within expression: GITHUB_SHA
bash generate.sh
cd js
echo "release_created? ${{ steps.release.outputs.release_created }}"
if [ ! ${{ steps.release.outputs.release_created }} ]; then
# we'll update version for beta release
git_hash=$(git rev-parse --short "${{ GITHUB_SHA }}")
CURRENT_VERSION=$(node -p "require('./package.json').version")
NEW_VERSION="${CURRENT_VERSION}-${git_hash}"
echo "New version: ${NEW_VERSION}"
sed -i "s/${CURRENT_VERSION}/${NEW_VERSION}/" package.json
fi
bash generate.sh
npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}