Skip to content

Commit 2beb883

Browse files
committed
chore: use bumpp for releasing
1 parent f25a9db commit 2beb883

File tree

5 files changed

+402
-56
lines changed

5 files changed

+402
-56
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, dev]
5+
branches:
6+
- main
7+
68
pull_request:
7-
branches: [main, dev]
9+
branches:
10+
- main
811

912
jobs:
1013
test:
@@ -20,7 +23,7 @@ jobs:
2023
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2124
- uses: actions/checkout@v4
2225

23-
- uses: pnpm/action-setup@v2
26+
- uses: pnpm/action-setup@v4.0.0
2427
name: Install pnpm
2528

2629
- uses: actions/setup-node@v4
@@ -34,31 +37,3 @@ jobs:
3437
# Runs a set of commands using the runners shell
3538
- name: Build and Test
3639
run: pnpm test
37-
38-
release:
39-
runs-on: ubuntu-latest
40-
needs: [test]
41-
if: "!contains(github.event.head_commit.message, 'skip-release') && !contains(github.event.head_commit.message, 'skip-ci') && github.event_name != 'pull_request'"
42-
permissions:
43-
contents: write
44-
issues: write
45-
pull-requests: write
46-
id-token: write
47-
steps:
48-
- uses: actions/checkout@v4
49-
50-
- uses: pnpm/action-setup@v2
51-
name: Install pnpm
52-
53-
- uses: actions/setup-node@v4
54-
with:
55-
node-version: lts/*
56-
cache: pnpm
57-
58-
- run: pnpm i
59-
60-
- run: pnpx semantic-release --branches main
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64-
NPM_CONFIG_PROVENANCE: true

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
id-token: write
6+
7+
on:
8+
push:
9+
tags:
10+
- 'v*'
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: lts/*
24+
25+
- run: npx changelogithub
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Install Dependencies
30+
run: pnpm i
31+
32+
- name: Publish to NPM
33+
run: pnpm -r publish --access public --no-git-checks
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
36+
NPM_CONFIG_PROVENANCE: true

.releaserc.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tsup",
3-
"version": "0.0.0-semantic-release",
3+
"version": "8.3.0",
44
"packageManager": "[email protected]",
55
"description": "Bundle your TypeScript library with no config, powered by esbuild",
66
"license": "MIT",
@@ -27,7 +27,8 @@
2727
"test": "npm run build && npm run test-only",
2828
"format": "prettier --write .",
2929
"test-only": "vitest run",
30-
"build-fast": "npm run build -- --no-dts"
30+
"build-fast": "npm run build -- --no-dts",
31+
"release": "bumpp"
3132
},
3233
"peerDependencies": {
3334
"@microsoft/api-extractor": "^7.36.0",
@@ -75,6 +76,7 @@
7576
"@types/fs-extra": "11.0.4",
7677
"@types/node": "20.14.11",
7778
"@types/resolve": "1.20.6",
79+
"bumpp": "^9.5.2",
7880
"flat": "6.0.1",
7981
"fs-extra": "11.2.0",
8082
"postcss": "8.4.39",

0 commit comments

Comments
 (0)