generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (80 loc) · 2.26 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run build
- run: npm run format-check
- run: npm run lint
- run: npm run package
test:
runs-on: ubuntu-latest
strategy:
matrix:
verbose:
- true
- false
include-merge-commits:
- true
- false
repo:
- owner: NixOS
repo: nixpkgs
basehead: cc455c004a60e1d65a0fb86ad6cc76168c6bb4d5...67c80531be622641b5b2ccc3a7aff355cb02476b
- owner: nix-community
repo: home-manager
basehead: b0d769691cc379c9ab91d3acec5d14e75c02c02b...59be1f4983ee3689de3172716a6c7e95a6a37bb7
- owner: nix-community
repo: home-manager
basehead: 0b197562ab7bf114dd5f6716f41d4b5be6ccd357...2f40cd05dc0ffe3ba69a94e9e76e0357c5b9a0b8
steps:
- uses: actions/checkout@v4
- name: test
uses: ./
with:
owner: ${{ matrix.repo.owner }}
repo: ${{ matrix.repo.repo }}
basehead: ${{ matrix.repo.basehead }}
token: ${{ secrets.GITHUB_TOKEN }}
verbose: ${{ matrix.verbose }}
include-merge-commits: ${{ matrix.include-merge-commits }}
release:
runs-on: ubuntu-latest
needs:
- build
- test
steps:
- uses: actions/create-github-app-token@v1.11.1
id: generate_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm install
- run: npm run build
- run: npm run package
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}