Skip to content

Commit 7fe208c

Browse files
committed
workflow: setup automated release with provenance
1 parent e1e5458 commit 7fe208c

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 `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/create-eslint-config/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
@@ -30,7 +30,8 @@
3030
},
3131
"homepage": "https://github.com/vuejs/create-eslint-config#readme",
3232
"publishConfig": {
33-
"access": "public"
33+
"access": "public",
34+
"provenance": true
3435
},
3536
"dependencies": {
3637
"ejs": "^3.1.10",

0 commit comments

Comments
 (0)