Files
toon/.github/workflows/release.yml
Okinea Dev aaef97a1ab ci: use slim Ubuntu runners (#256)
It will be more environmentally friendly and cheaper (at least for GitHub, because it's a public project and GitHub pays for it, not you)

GitHub blog post about new 1 vCPU runners: https://github.blog/changelog/2025-10-28-1-vcpu-linux-runner-now-available-in-github-actions-in-public-preview

Pricing (tl;dr: $0.002/min): https://docs.github.com/en/billing/reference/actions-runner-pricing

GitHub-hosted runners reference: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#standard-github-hosted-runners-for--private-repositories
2026-01-03 16:12:45 +01:00

53 lines
1.2 KiB
YAML

name: Release + Publish
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
runs-on: ubuntu-slim
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0 # Required for fetching tags and generating release notes
persist-credentials: true
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Generate changelog and create GitHub release
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm run build
- name: Publish packages to npm
run: npm install -g npm@latest && pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}