File tree Expand file tree Collapse file tree 6 files changed +76
-13
lines changed Expand file tree Collapse file tree 6 files changed +76
-13
lines changed Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14-
14+ ---
1515name : Lint
16- on : [push, pull_request]
16+ on : [push, pull_request, workflow_dispatch ]
1717jobs :
1818 lint :
1919 runs-on : ubuntu-latest
2020 steps :
2121 - uses : actions/checkout@v2
22- - run : |
23- echo "No lint checks";
24- exit 1;
22+ - uses : actions/setup-node@v1
23+ with :
24+ node-version : 16
25+ - name : Install dependencies
26+ run : npm ci
27+ - name : Lint files
28+ run : npm run lint
Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - main
5+ name : release-please
6+ jobs :
7+ release-please :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : google-github-actions/release-please-action@v3
11+ with :
12+ token : ${{secrets.GOOGLEWORKSPACE_BOT_TOKEN}}
13+ release-type : node
14+ package-name : release-please-action
15+ - uses : actions/checkout@v2
16+ if : ${{ steps.release.outputs.release_created }}
17+ - uses : actions/setup-node@v1
18+ if : ${{ steps.release.outputs.release_created }}
19+ with :
20+ node-version : 16
21+ - name : Write test credentials
22+ if : ${{ steps.release.outputs.release_created }}
23+ run : |
24+ echo "${CLASP_CREDENTIALS}" > "${HOME}/.clasprc.json"
25+ env :
26+ CLASP_CREDENTIALS : ${{secrets.LIBRARIES_OWNER_CLASP_TOKEN}}
27+ - name : Depoy scripts
28+ if : ${{ steps.release.outputs.release_created }}
29+ run : |
30+ cd src
31+ npx @google/clasp push
32+ MESSAGE=$(git log -1 --pretty=%B) npx @google/clasp version ${MESSAGE}
Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14-
14+ ---
1515name : Test
16- on : [push, pull_request]
16+ on : [push, pull_request, workflow_dispatch ]
1717jobs :
1818 test :
1919 runs-on : ubuntu-latest
2020 steps :
2121 - uses : actions/checkout@v2
22- - run : |
23- echo "No tests";
24- exit 1;
22+ - uses : actions/setup-node@v1
23+ with :
24+ node-version : 16
25+ - name : Install dependencies
26+ run : npm ci
27+ - name : Run tests
28+ run : npm run test
Original file line number Diff line number Diff line change 1+ on : [pull_request]
2+ name : Update dist folder
3+ jobs :
4+ update-dist-src :
5+ if : " ${{ contains(github.event.pull_request.labels.*.name, 'autorelease: pending') }}"
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v2
9+ with :
10+ ref : ${{ github.event.pull_request.head.ref }}
11+ token : ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }}
12+ - uses : actions/setup-node@v1
13+ with :
14+ node-version : 16
15+ - name : Install dependencies
16+ run : npm ci
17+ - name : Update dist and doc folders
18+ run : |
19+ npm run dist
20+ npm run docs
21+ - uses : stefanzweifel/git-auto-commit-action@v4
22+ with :
23+ commit_message : " chore: Update dist/ and docs/ directories"
24+ commit_user_name : Google Workspace Bot
25+ commit_user_email : googleworkspace-bot@google.com
26+ commit_author : Google Workspace Bot <googleworkspace-bot@google.com>
Original file line number Diff line number Diff line change 3232 "urlsafe-base64" : " 1.0.0"
3333 },
3434 "scripts" : {
35- "preversion" : " npm test && cd src/ && clasp push" ,
36- "version" : " npm run dist && npm run doc && git add -A dist docs" ,
37- "postversion" : " MESSAGE=$(git log -1 --pretty=%B) && cd src/ && clasp version $MESSAGE" ,
3835 "dist" : " gulp dist" ,
3936 "lint" : " gulp lint" ,
4037 "doc" : " jsdoc -c jsdoc.json src/*.js README.md" ,
You can’t perform that action at this time.
0 commit comments