Skip to content

Commit 1b9a763

Browse files
committed
workflow: add release automation with provenance
1 parent ad9bd77 commit 1b9a763

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

.github/MAINTENANCE.md

Lines changed: 10 additions & 0 deletions
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 `npm 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/tsconfig/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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
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: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
},
2222
"homepage": "https://github.com/vuejs/tsconfig#readme",
2323
"publishConfig": {
24-
"access": "public"
24+
"access": "public",
25+
"provenance": true
2526
},
2627
"peerDependencies": {
2728
"typescript": "5.x",

0 commit comments

Comments
 (0)