File tree Expand file tree Collapse file tree 1 file changed +0
-53
lines changed Expand file tree Collapse file tree 1 file changed +0
-53
lines changed Original file line number Diff line number Diff line change 57
57
token : ${{ secrets.CODECOV_TOKEN }}
58
58
fail_ci_if_error : false
59
59
60
- release :
61
- needs : test
62
- runs-on : ubuntu-latest
63
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
64
- permissions :
65
- contents : write
66
- packages : write
67
-
68
- steps :
69
- - uses : actions/checkout@v4
70
-
71
- - name : Setup Node.js
72
- uses : actions/setup-node@v4
73
- with :
74
- node-version : ' 20.x'
75
- registry-url : ' https://registry.npmjs.org'
76
-
77
- - name : Install dependencies
78
- run : npm ci
79
-
80
- - name : Build
81
- run : npm run build:sdk || npm run build
82
-
83
- - name : Check if version changed
84
- id : version
85
- run : |
86
- PUBLISHED_VERSION=$(npm view @validkit/sdk version 2>/dev/null || echo "0.0.0")
87
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
88
- if [ "$PUBLISHED_VERSION" != "$PACKAGE_VERSION" ]; then
89
- echo "changed=true" >> $GITHUB_OUTPUT
90
- echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
91
- else
92
- echo "changed=false" >> $GITHUB_OUTPUT
93
- fi
94
-
95
- - name : Create Release
96
- if : steps.version.outputs.changed == 'true'
97
- uses : actions/create-release@v1
98
- env :
99
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100
- with :
101
- tag_name : v${{ steps.version.outputs.version }}
102
- release_name : Release v${{ steps.version.outputs.version }}
103
- body : |
104
- See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
105
- draft : false
106
- prerelease : false
107
-
108
- - name : Publish to npm
109
- if : steps.version.outputs.changed == 'true'
110
- run : npm publish --access public
111
- env :
112
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments