Skip to content

Release v1.16.1

Release v1.16.1 #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify tag matches package.json version
run: |
TAG="${GITHUB_REF_NAME#v}"
PKG="$(node -p "require('./package.json').version")"
if [ "$TAG" != "$PKG" ]; then
echo "Tag $GITHUB_REF_NAME does not match package.json version $PKG"
exit 1
fi
- name: Release docs sync check
run: pnpm run release:docs-check
- name: Type check
run: pnpm run check
- name: Build
run: pnpm run build
- name: Package release artifact
run: pnpm run release:package
- name: Smoke / bootstrap / no-clone tests
run: |
bash scripts/test-smoke.sh
bash scripts/test-bootstrap.sh
bash scripts/test-no-clone-install.sh
- name: Extract release notes from CHANGELOG
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v v="$VERSION" '
$0 ~ "^## \\[" v "\\]" { flag=1; next }
flag && /^## \[/ { exit }
flag { print }
' CHANGELOG.md > release-notes.md
if [ ! -s release-notes.md ]; then
echo "No CHANGELOG section found for version $VERSION" >&2
exit 1
fi
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$GITHUB_REF_NAME" \
"dist/release/memoria-linux-x64-$GITHUB_REF_NAME.tar.gz" \
--title "$GITHUB_REF_NAME" \
--notes-file release-notes.md
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance --access public