This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
generated from kachick/action-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (64 loc) · 2.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
branches: [main]
paths-ignore:
- '.github/dependabot.yml'
- 'LICENSE'
- '.editorconfig'
- 'README.md'
- '.vscode/**'
pull_request:
paths-ignore:
- '.github/dependabot.yml'
- 'LICENSE'
- '.editorconfig'
- 'README.md'
- '.vscode/**'
jobs:
test:
# To update git diff
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch example project
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# https://yoshiori.hatenablog.com/entry/2021/12/08/220839
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Test (Need to build before test)
run: npm test
- name: Ensure we can make package
run: npm run package
# dependabot E-mail address: https://github.com/orgs/community/discussions/26560
- name: Update build files
run: |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
git add dist
if ! git diff --exit-code --quiet
then
git commit -m 'Update build files'
git push
fi
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' }}
- name: Prevent missing commits after compile
run: git add --intent-to-add . && git diff --exit-code
lint:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: denoland/setup-deno@0df5d9c641efdff149993c321fc27c11c5df8623 # v1.1.3
with:
deno-version: '1.37.1' # selfup { "regex": "\\d[^']+", "script": "deno --version | head -n 1 | cut -d ' ' -f 2" }
- run: deno lint