66 - main
77 workflow_dispatch :
88 inputs :
9- skip_coveralls :
10- description : " Skip Coveralls "
9+ skip_build_docs :
10+ description : " Skip build docs "
1111 type : boolean
1212 default : false
13- skip_gas :
14- description : " Skip push"
13+ skip_build_lib :
14+ description : " Skip build lib"
15+ type : boolean
16+ default : false
17+ skip_deploy_docs :
18+ description : " Skip deploy docs"
19+ type : boolean
20+ default : false
21+ skip_deploy_lib_ci :
22+ description : " Skip deploy lib (CI)"
23+ type : boolean
24+ default : false
25+ skip_deploy_lib_release :
26+ description : " Skip deploy lib (release)"
27+ type : boolean
28+ default : false
29+ skip_qa_coveralls :
30+ description : " Skip QA Coveralls"
31+ type : boolean
32+ default : false
33+ skip_qa_sonarqube :
34+ description : " Skip QA SonarQube"
1535 type : boolean
1636 default : false
1737 skip_release :
1838 description : " Skip release"
1939 type : boolean
2040 default : true
21- skip_sonarqube :
22- description : " Skip SonarQube"
23- type : boolean
24- default : false
25- skip_tests :
26- description : " Skip tests"
41+ skip_test :
42+ description : " Skip test"
2743 type : boolean
2844 default : false
2945
@@ -49,64 +65,71 @@ jobs:
4965 GCLOUD_PROJECT_ID : ${{secrets.GCLOUD_PROJECT_ID}}
5066 GCLOUD_PROJECT_NR : ${{secrets.GCLOUD_PROJECT_NR}}
5167 steps :
68+ - id : release
69+ name : Release
70+ if : ${{ !github.event.inputs.skip_release }}
71+ uses : googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
72+ with :
73+ release-type : node
5274 - id : checkout
5375 name : Checkout
54- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 # Use v3 or later
76+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5577 with :
5678 persist-credentials : false
5779 token : ${{ secrets.GITHUB_TOKEN }}
5880 fetch-depth : 0
59- - id : nodejs
60- name : Use Node.js
61- uses : actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 # Use v3 or later
81+ - id : setup- nodejs
82+ name : Setup Node.js
83+ uses : actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
6284 with :
6385 node-version : 22.x
6486 cache : " npm"
65- - id : build
66- name : Build
87+ - id : build-lib
88+ if : ${{ !github.event.inputs.skip_build_lib }}
89+ name : Build lib
6790 run : npm run ci:build
6891 - id : test
69- if : ${{ !github.event.inputs.skip_tests }}
92+ if : ${{ !github.event.inputs.skip_test }}
7093 name : Test
7194 run : npm run ci:test
72- - id : docs
95+ - id : build-docs
96+ if : ${{ !github.event.inputs.skip_build_docs }}
7397 name : Build docs
7498 run : npm run ci:docs
75- - name : Release Please
76- if : ${{ !github.event.inputs.skip_release }}
77- id : release
78- uses : googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
79- with :
80- release-type : node # Or the appropriate release type for your project
81- - id : coveralls
82- if : ${{ !github.event.inputs.skip_coveralls }}
83- name : Coveralls
99+ - id : qa-coveralls
100+ if : ${{ !github.event.inputs.skip_qa_coveralls }}
101+ name : QA Coveralls
84102 uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2
85- - id : sonarqube
86- if : ${{ !github.event.inputs.skip_sonarqube }}
87- name : SonarQube Scan
103+ - id : qa- sonarqube
104+ if : ${{ !github.event.inputs.skip_qa_sonarqube }}
105+ name : QA SonarQube
88106 uses : SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d # v5
89107 env :
90108 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91109 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
92- # SONAR_PROJECT_VERSION: ${{ steps.release-status.outputs.new_release_published == 'true' && steps.release-status.outputs.new_release_version || '' }} Remove this line
93- - id : push-gas
94- if : ${{ !github.event.inputs.skip_gas }}
95- name : Push to GAS
110+ - id : deploy-lib-ci
111+ if : ${{ !github.event.inputs.skip_deploy_lib_ci }}
112+ name : Deploy Lib (CI)
96113 run : |
97114 npm run push
98115 echo "new_gas_version=$(cat build/gas/lib-version.txt)" >> "${GITHUB_OUTPUT}"
99- - id : deploy-lib
100- if : ${{ !github.event.inputs.skip_release && steps.release.outputs.release_created }} # Check if a release was created
101- name : Deploy Lib
116+ - id : deploy-lib-release
117+ if : ${{ !github.event.inputs.skip_deploy_lib_release && !github.event.inputs. skip_release && steps.release.outputs.release_created }} # Check if a release was created
118+ name : Deploy Lib (Release)
102119 run : npm run deploy
103120 env :
104- CLASP_DEPLOYMENT_NAME : ${{ steps.release.outputs.tag_name }} # Use the tag name from release-please
121+ CLASP_DEPLOYMENT_NAME : ${{ steps.release.outputs.tag_name }}
105122 - id : update-release-notes
106123 if : ${{ !github.event.inputs.skip_release && steps.release.outputs.release_created }} # Check if a release was created
107124 name : Update Release Notes
108125 run : |
109126 npm run release:update
110127 env :
111- CLASP_DEPLOYMENT_NAME : ${{ steps.release.outputs.tag_name }} # Use the tag name from release-please
128+ CLASP_DEPLOYMENT_NAME : ${{ steps.release.outputs.tag_name }}
112129 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130+ - id : deploy-docs
131+ if : ${{ !github.event.inputs.skip_deploy_docs }}
132+ name : Deploy docs
133+ uses : JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4
134+ with :
135+ folder : docs/build
0 commit comments