-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.71 KB
/
pr.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: PR Workflow
env:
CI: true
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Enable node
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Disable verify-store-integrity
run: |
pnpm set verify-store-integrity false
- name: pnpm install
run: |
pnpm install --frozen-lockfile
- name: Build packages
run: pnpm tsc -b
- name: Lint, build and test
run: pnpm nx run-many --target build,lint,test --all --exclude examples-dotnet-api
- name: Version command
id: version
run: |
npx changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update DotNet SDK version and copyright year
run: |
version=$(node -pe "require('./libs/dotnet-sdk/package.json').version")
echo "Version: $version"
currentYear=$(node -pe "new Date().getFullYear()")
csproj_path=libs/dotnet-sdk/FeatureBoard.DotnetSdk.csproj
sed -i "s/<Version>.*<\/Version>/<Version>$version<\/Version>/" $csproj_path
sed -i "s/<Copyright>.*<\/Copyright>/<Copyright>Copyright (c) Arkahna $currentYear<\/Copyright>/" $csproj_path
cat $csproj_path
- name: Package libs
run: pnpm package