File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : Build and Release
4+
5+ # Controls when the workflow will run
6+ on :
7+ # Triggers the workflow on push or pull request events but only for the master branch
8+ push :
9+ branches : [ master ]
10+
11+ # Allows you to run this workflow manually from the Actions tab
12+ workflow_dispatch :
13+ inputs :
14+ tag :
15+ description : ' tag number'
16+ required : true
17+
18+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+ jobs :
20+ # This workflow contains a single job called "build"
21+ build :
22+ # The type of runner that the job will run on
23+ runs-on : ubuntu-latest
24+
25+ # Steps represent a sequence of tasks that will be executed as part of the job
26+ steps :
27+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28+ - uses : actions/checkout@v2
29+
30+ # Runs a single command using the runners shell
31+ - name : Install Npm dependencies
32+ run : npm install
33+
34+ # Runs a set of commands using the runners shell
35+ - name : Npm build
36+ run : npm run build
37+
38+ # Runs a set of commands using the runners shell
39+ - name : Zip disk folder
40+ run : |
41+ cd ./dist/LeetcodeSessionManager
42+ zip -r ../../LeetcodeSessionManager-$(node -p "require('../../package.json').version").zip .
43+
44+ - name : ' Create GitHub Release'
45+ uses : softprops/action-gh-release@v1
46+ with :
47+ files : ./LeetcodeSessionManager*.zip
48+ tag_name : v${{ github.run_number }}
49+ name : Release V${{ github.run_number }}
You can’t perform that action at this time.
0 commit comments