Skip to content

Commit 4099068

Browse files
committed
ci: Add release job to ci
1 parent a2a4aff commit 4099068

3 files changed

Lines changed: 1822 additions & 91 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on: [push]
33
jobs:
44
build:
55
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
6-
76
runs-on: ${{ matrix.os }}
87
strategy:
98
matrix:
@@ -30,3 +29,16 @@ jobs:
3029

3130
- name: Build
3231
run: yarn build
32+
33+
release:
34+
name: Release
35+
runs-on: ubuntu-latest
36+
needs: build
37+
if: github.ref == 'refs/heads/main'
38+
39+
steps:
40+
- name: Release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
run: yarn semantic-release

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.0",
2+
"version": "0.0.0-development",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",
@@ -18,7 +18,8 @@
1818
"prepare": "tsdx build",
1919
"size": "size-limit",
2020
"analyze": "size-limit --why",
21-
"release": "standard-version"
21+
"release": "standard-version",
22+
"semantic-release": "semantic-release"
2223
},
2324
"husky": {
2425
"hooks": {
@@ -58,10 +59,15 @@
5859
"graphql-tag": "^2.12.5",
5960
"husky": "^7.0.1",
6061
"size-limit": "^5.0.3",
62+
"semantic-release": "^17.4.7",
6163
"standard-version": "^9.3.1",
6264
"tsdx": "^0.14.1",
6365
"tslib": "^2.3.1",
6466
"typescript": "^4.3.5",
6567
"vite": "^2.5.0"
68+
},
69+
"repository": {
70+
"type": "git",
71+
"url": "https://github.com/danielwaltz/vite-plugin-graphql-codegen.git"
6672
}
6773
}

0 commit comments

Comments
 (0)