File tree 2 files changed +50
-5
lines changed
2 files changed +50
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Release on tag
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*"
7
+
8
+ permissions :
9
+ id-token : write
10
+ contents : write
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ with :
19
+ fetch-depth : 0
20
+ - uses : pnpm/action-setup@v2
21
+ - uses : actions/setup-node@v3
22
+ with :
23
+ cache : pnpm
24
+ node-version-file : .nvmrc
25
+ registry-url : " https://registry.npmjs.org"
26
+ - run : pnpm install --frozen-lockfile --prefer-offline
27
+ - run : sudo apt-get install -y valgrind
28
+
29
+ - name : Build the libraries
30
+ run : pnpm moon run :build
31
+
32
+ - name : Publish the libraries
33
+ run : pnpm publish -r --access=public --no-git-checks
34
+ env :
35
+ NPM_CONFIG_PROVENANCE : true
36
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
37
+
38
+ - name : Create a draft release
39
+ run : |
40
+ NEW_VERSION=$(pnpm lerna list --json | jq -r '.[] | select(.name == "@codspeed/core") | .version')
41
+ gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d
42
+ env :
43
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 2
2
# Usage: ./scripts/release.sh <major|minor|patch>
3
3
set -ex
4
4
5
+ # Fail if not on main
6
+ if [ " $( git rev-parse --abbrev-ref HEAD) " != " main" ]; then
7
+ echo " Not on default branch"
8
+ exit 1
9
+ fi
10
+
5
11
if [ $# -ne 1 ]; then
6
12
echo " Usage: ./release.sh <major|minor|patch>"
7
13
exit 1
10
16
# Fail if there are any unstaged changes left
11
17
git diff --exit-code
12
18
13
- pnpm lerna version $1 -y --force-publish --no-private
14
- pnpm moon run :build
15
- pnpm publish -r --access=public
16
- NEW_VERSION=$( pnpm lerna list --json | jq -r ' .[] | select(.name == "@codspeed/core") | .version' )
17
- gh release create v$NEW_VERSION --title " v$NEW_VERSION " --generate-notes -d
19
+ pnpm lerna version $1 --force-publish --no-private
You can’t perform that action at this time.
0 commit comments