Skip to content

Bump all packages to 0.1.10 #13

Bump all packages to 0.1.10

Bump all packages to 0.1.10 #13

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build all packages
run: pnpm build
- name: Run tests
run: pnpm test
- name: Generate changelog from tag
id: changelog
run: |
# Extract version from tag
VERSION="${GITHUB_REF#refs/tags/v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
# Generate changelog from commits since previous tag
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREVIOUS_TAG" ]; then
CHANGELOG=$(git log "$PREVIOUS_TAG"..HEAD --pretty=format:"- %s (%h)" --no-merges)
else
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
# Write changelog to file to handle multiline
echo "$CHANGELOG" > /tmp/changelog.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.changelog.outputs.version }}
body_path: /tmp/changelog.txt
draft: false
prerelease: ${{ contains(github.ref, '-') }}
generate_release_notes: true
- name: Publish to npm
run: pnpm publish -r --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}