Skip to content
Merged
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
32 changes: 6 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@
name: Release

permissions:
id-token: write
contents: write

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/

- run: pnpm dlx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# # Uncomment the following lines to publish to npm on CI
#
# - run: pnpm install
# - run: pnpm publish --no-git-checks -r --access public
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# NPM_CONFIG_PROVENANCE: true
uses: sxzz/workflows/.github/workflows/release.yml@v1
with:
publish: true
permissions:
contents: write
id-token: write
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

_description_

## Note for Developers

This starter recommands using [npm Trusted Publisher](https://github.com/e18e/ecosystem-issues/issues/201), where the release is done on CI to ensure the security of the packages.

To do so, you need to run `pnpm publish` manually for the very first time to create the package on npm, and then go to `https://www.npmjs.com/package/<your-package-name>/access` to set the connection to your GitHub repo.

Then for the future releases, you can run `pnpm run release` to do the release and the GitHub Actions will take care of the release process.

## Sponsors

<p align="center">
Expand Down
14 changes: 0 additions & 14 deletions build.config.ts

This file was deleted.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "pnpm@10.6.2",
"packageManager": "pnpm@10.17.1",
"description": "_description_",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand All @@ -16,21 +16,21 @@
"keywords": [],
"sideEffects": false,
"exports": {
".": "./dist/index.mjs",
".": "./dist/index.js",
"./package.json": "./package.json"
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"build": "tsdown",
"dev": "tsdown --watch",
"lint": "eslint",
"prepublishOnly": "nr build",
"release": "bumpp && pnpm publish",
"release": "bumpp",
"start": "tsx src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
Expand All @@ -45,10 +45,10 @@
"eslint": "catalog:cli",
"lint-staged": "catalog:cli",
"simple-git-hooks": "catalog:cli",
"tinyexec": "catalog:utils",
"tinyexec": "catalog:testing",
"tsdown": "catalog:cli",
"tsx": "catalog:cli",
"typescript": "catalog:cli",
"unbuild": "catalog:cli",
"vite": "catalog:cli",
"vitest": "catalog:testing",
"vitest-package-exports": "catalog:testing",
Expand Down
Loading
Loading