File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 11name : knights-ecomm-fe CI
22
3- on :
3+ on :
44 push :
55 pull_request :
66
3838 with :
3939 github-token : ${{ secrets.GITHUB_TOKEN }}
4040
41+ release :
42+ if : github.ref == 'refs/heads/ft-release-config'
43+ runs-on : ubuntu-latest
44+
45+ steps :
46+ - uses : actions/checkout@v4
47+ with :
48+ fetch-depth : 0
49+
50+ - name : Use Node.js
51+ uses : actions/setup-node@v4
52+ with :
53+ node-version : ' 20.x'
54+
55+ - name : Install Dependencies
56+ run : npm install
57+
58+ - name : Build project
59+ run : npm run build
60+
61+ - name : Bump Version
62+ id : bump_version
63+ run : |
64+ NEW_VERSION=$(npm version minor --no-git-tag-version)
65+ echo "New version is $NEW_VERSION"
66+ echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
67+
68+ - name : Zip dist folder
69+ run : zip -r dist.zip ./dist
70+
71+ - name : Create Release
72+ id : create_release
73+ uses : actions/create-release@v1
74+ env :
75+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76+ with :
77+ tag_name : ${{ env.NEW_VERSION }}
78+ release_name : Release ${{ env.NEW_VERSION }}
79+ draft : false
80+ prerelease : false
81+
82+ - name : Upload Release Asset
83+ uses : actions/upload-release-asset@v1
84+ env :
85+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86+ with :
87+ upload_url : ${{ steps.create_release.outputs.upload_url }}
88+ asset_path : ./dist
89+ asset_name : dist.zip
90+ asset_content_type : application/zip
Original file line number Diff line number Diff line change 11{
22 "name" : " knights-ecomm-fe" ,
33 "private" : true ,
4- "version" : " 0 .0.0" ,
4+ "version" : " 1 .0.0" ,
55 "type" : " module" ,
66 "scripts" : {
77 "dev" : " vite" ,
You can’t perform that action at this time.
0 commit comments