Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 34 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,63 @@
name: release

permissions:
id-token: write
contents: write
actions: read

on:
push:
tags:
- 'v*'

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- run: pnpm install
- run: pnpm lint
- run: pnpm prepack
- run: pnpm test
# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions: {}

jobs:
release:
needs: ci
concurrency:
group: release
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4

- run: corepack enable

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24
cache: pnpm
registry-url: 'https://registry.npmjs.org'
node-version: latest
registry-url: 'https://registry.npmjs.org/'

- name: 📦 Install dependencies
run: pnpm install

- name: Build (stub)
run: pnpm dev:prepare

- run: pnpm install
- run: pnpm prepack
- name: 🛠 Build project
run: pnpm prepack

- name: Determine npm tag
- name: 🏷 Determine npm tag
id: npm-tag
shell: bash
run: |
TAG="${GITHUB_REF#refs/tags/v}"
if [[ "$TAG" == *"-alpha"* ]]; then
echo "tag=alpha" >> $GITHUB_OUTPUT
echo "tag=alpha" >> "$GITHUB_OUTPUT"
elif [[ "$TAG" == *"-beta"* ]]; then
echo "tag=beta" >> $GITHUB_OUTPUT
echo "tag=beta" >> "$GITHUB_OUTPUT"
elif [[ "$TAG" == *"-rc"* ]]; then
echo "tag=rc" >> $GITHUB_OUTPUT
echo "tag=rc" >> "$GITHUB_OUTPUT"
else
echo "tag=latest" >> $GITHUB_OUTPUT
echo "tag=latest" >> "$GITHUB_OUTPUT"
fi

- name: GitHub Release
- name: 📝 GitHub Release
run: pnpm dlx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to npm
run: npm publish --provenance --access public --tag ${{ steps.npm-tag.outputs.tag }}
- name: 📦 Release
run: pnpm publish --no-git-checks --access public --tag ${{ steps.npm-tag.outputs.tag }}
9 changes: 0 additions & 9 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
"dev:docs": "nuxi dev docs",
"build:docs": "nuxi build docs",
"release": "bumpp --push --no-push-all",
"release": "bumpp --push",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"typecheck": "vue-tsc --noEmit",
Expand Down
Loading