Skip to content

Commit bb462cc

Browse files
committed
workflow: add automated release with provenance
1 parent 1fc321c commit bb462cc

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.github/MAINTENANCE.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This document explains how to perform the project's maintenance tasks.
2+
3+
### Creating a new release
4+
5+
Anyone with write access to the repository can request a new release. To do so, follow these steps:
6+
7+
1. Run `pnpm version <patch|minor|major>` locally to bump the version number and create a new commit / tag.
8+
2. Push the commit and tag to the repository by running `git push --follow-tags`.
9+
3. The release will be automatically published to npm by GitHub Actions once approved by an administrator.
10+
4. Go to <https://github.com/vuejs/eslint-config-typescript/releases/new> and create a new release with the tag that was just created. Describe the notable changes in the release notes.

.github/workflows/publish.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
jobs:
9+
release:
10+
# Use Publish environment for deployment protection
11+
environment: Publish
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 'lts/*'
21+
registry-url: 'https://registry.npmjs.org'
22+
- run: pnpm install
23+
- run: pnpm publish
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"prepublishOnly": "pkgroll --clean-dist"
2727
},
2828
"publishConfig": {
29-
"access": "public"
29+
"access": "public",
30+
"provenance": true
3031
},
3132
"repository": {
3233
"type": "git",

0 commit comments

Comments
 (0)