File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create release from version bump
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ create-release :
13+ name : Create GitHub Release
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 2
21+
22+ - name : Extract version from tag
23+ id : version_extract
24+ run : |
25+ # Remove 'v' prefix from tag name to get version
26+ VERSION=${GITHUB_REF#refs/tags/v}
27+ echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
28+ echo "Extracted version: $VERSION"
29+
30+ - name : Create Release
31+ env :
32+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ run : |
34+ gh release create "${{ github.ref_name }}" \
35+ --repo="${{ github.repository }}" \
36+ --title="Release ${{ github.ref_name }}" \
37+ --generate-notes
38+
39+ publish-npm :
40+ name : Publish to NPM
41+ needs : create-release
42+ runs-on : ubuntu-latest
43+ permissions :
44+ contents : read
45+ packages : write
46+ steps :
47+ - uses : actions/checkout@v4
48+ - uses : actions/setup-node@v4
49+ with :
50+ node-version : " 20.x"
51+ registry-url : https://registry.npmjs.org
52+ - run : |
53+ npm ci
54+ npm run build
55+ npm publish --registry=https://registry.npmjs.org
56+ env:
57+ NODE_AUTH_TOKEN: ${{secrets.GLIDE_ORG_NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments