-
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (104 loc) · 2.59 KB
/
main.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build Action
on:
push:
paths-ignore:
- "dist/**"
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
standalone: true
run_install: true
- uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- run: pnpm run lint
build:
runs-on: ubuntu-22.04
needs:
- lint
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
standalone: true
run_install: true
- uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- uses: actions/cache@v4
env:
cache-name: cache-build
with:
path: dist/
key: ${{ runner.os }}-build-${{ github.run_id }}
- run: pnpm run build
test:
runs-on: ubuntu-22.04
needs:
- lint
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
standalone: true
run_install: true
- uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- run: pnpm run test
run:
runs-on: ubuntu-22.04
needs:
- build
- test
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
env:
cache-name: cache-build
with:
path: dist/
key: ${{ runner.os }}-build-${{ github.run_id }}
- uses: ./
with:
version: 5.5.2
csproj-files: files/csproj/TestProject.csproj
npm-files: files/npm/package.json
setuppy-files: files/setuppy/setup.py
push:
runs-on: ubuntu-22.04
needs:
- run
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/cache@v4
env:
cache-name: cache-build
with:
path: dist/
key: ${{ runner.os }}-build-${{ github.run_id }}
- continue-on-error: true
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add dist/*
git commit -m "Added changes from ${{ github.run_id }} [actions skip]" -a
- continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.ref }}