Skip to content

Commit f85e2e3

Browse files
authored
Merge pull request #5 from Jakub007d/fix/css
Testing release and publishing
2 parents 20c5ee3 + e811c99 commit f85e2e3

31 files changed

Lines changed: 16243 additions & 816 deletions

File tree

.github/workflows/main.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
name: Pull Request Checks
1+
name: CI/CD Pipeline
22

33
on:
44
pull_request:
5+
branches:
6+
- '**'
57
push:
8+
branches:
9+
- '**'
610
workflow_dispatch:
711

812
jobs:
9-
pr-checks:
13+
build-and-release:
1014
runs-on: ubuntu-latest
11-
name: PR Validation & Testing
15+
name: Build and Release
1216

1317
steps:
1418
- name: Checkout repository
@@ -21,6 +25,7 @@ jobs:
2125
with:
2226
node-version: '20'
2327
cache: 'yarn'
28+
registry-url: 'https://registry.npmjs.org'
2429

2530
- name: Install dependencies
2631
run: yarn install --frozen-lockfile
@@ -29,7 +34,7 @@ jobs:
2934
uses: nrwl/nx-set-shas@v4
3035

3136
- name: Run build on affected projects
32-
run: npx nx affected --target=build --parallel=3
37+
run: npx nx affected --target=build --parallel=3 --exclude=@jakub007d/react-renderer-demo
3338
continue-on-error: false
3439

3540
- name: Run lint on affected projects
@@ -40,30 +45,39 @@ jobs:
4045
run: npx nx affected --target=typecheck --parallel=3
4146
continue-on-error: false
4247

43-
- name: Run tests on affected projects
44-
run: npx nx affected --target=test --parallel=3 --coverage
45-
continue-on-error: false
46-
47-
- name: Run Nx release dry-run
48+
# Dry-run release on pull requests
49+
- name: Run Nx release dry-run (PR)
50+
if: github.event_name == 'pull_request'
4851
id: nx-release-dry-run
4952
run: |
5053
echo "Running Nx release in dry-run mode..."
5154
npx nx release --dry-run --first-release --verbose 2>&1 | tee release-output.txt
5255
EXIT_CODE=${PIPESTATUS[0]}
5356
5457
if [ $EXIT_CODE -ne 0 ]; then
55-
echo "L Nx release dry-run FAILED with exit code $EXIT_CODE"
58+
echo " Nx release dry-run FAILED with exit code $EXIT_CODE"
5659
echo "release_status=failed" >> $GITHUB_OUTPUT
5760
exit $EXIT_CODE
5861
else
59-
echo " Nx release dry-run SUCCEEDED"
62+
echo " Nx release dry-run SUCCEEDED"
6063
echo "release_status=success" >> $GITHUB_OUTPUT
6164
fi
6265
continue-on-error: false
6366

67+
# Actual release on push (works for forks too)
68+
- name: Run Nx release (Push)
69+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
70+
env:
71+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72+
run: |
73+
echo "Running Nx release..."
74+
npx nx release --first-release --verbose
75+
continue-on-error: false
76+
6477
github-action-show-version:
6578
runs-on: ubuntu-latest
6679
name: Next version is
80+
if: github.event_name == 'pull_request'
6781
steps:
6882
- name: Publish a version comment
6983
uses: rvsia/github-action-show-version@v1.9alpha

.github/workflows/main.yml.backup

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
7+
8+
jobs:
9+
pr-checks:
10+
runs-on: ubuntu-latest
11+
name: PR Validation & Testing
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'yarn'
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Derive appropriate SHAs for base and head for nx affected commands
29+
uses: nrwl/nx-set-shas@v4
30+
31+
- name: Run build on affected projects
32+
run: npx nx affected --target=build --parallel=3
33+
continue-on-error: false
34+
35+
- name: Run lint on affected projects
36+
run: npx nx affected --target=lint --parallel=3
37+
continue-on-error: false
38+
39+
- name: Run typecheck on affected projects
40+
run: npx nx affected --target=typecheck --parallel=3
41+
continue-on-error: false
42+
43+
- name: Run tests on affected projects
44+
run: npx nx affected --target=test --parallel=3 --coverage
45+
continue-on-error: false
46+
47+
- name: Run Nx release dry-run
48+
id: nx-release-dry-run
49+
run: |
50+
echo "Running Nx release in dry-run mode..."
51+
npx nx release --dry-run --first-release --verbose 2>&1 | tee release-output.txt
52+
EXIT_CODE=${PIPESTATUS[0]}
53+
54+
if [ $EXIT_CODE -ne 0 ]; then
55+
echo "L Nx release dry-run FAILED with exit code $EXIT_CODE"
56+
echo "release_status=failed" >> $GITHUB_OUTPUT
57+
exit $EXIT_CODE
58+
else
59+
echo " Nx release dry-run SUCCEEDED"
60+
echo "release_status=success" >> $GITHUB_OUTPUT
61+
fi
62+
continue-on-error: false
63+
64+
github-action-show-version:
65+
runs-on: ubuntu-latest
66+
name: Next version is
67+
steps:
68+
- name: Publish a version comment
69+
uses: rvsia/github-action-show-version@v1.9alpha
70+
id: comment
71+
with:
72+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.nx/workspace-data/lockfile.hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3380443024007608475
1+
6908642938750138822

.nx/workspace-data/parsed-lock-file.json

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,6 +2214,15 @@
22142214
"hash": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ=="
22152215
}
22162216
},
2217+
"npm:@babel/runtime@7.28.4": {
2218+
"type": "npm",
2219+
"name": "npm:@babel/runtime@7.28.4",
2220+
"data": {
2221+
"version": "7.28.4",
2222+
"packageName": "@babel/runtime",
2223+
"hash": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ=="
2224+
}
2225+
},
22172226
"npm:@babel/runtime@7.19.0": {
22182227
"type": "npm",
22192228
"name": "npm:@babel/runtime@7.19.0",
@@ -2232,15 +2241,6 @@
22322241
"hash": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA=="
22332242
}
22342243
},
2235-
"npm:@babel/runtime@7.28.4": {
2236-
"type": "npm",
2237-
"name": "npm:@babel/runtime@7.28.4",
2238-
"data": {
2239-
"version": "7.28.4",
2240-
"packageName": "@babel/runtime",
2241-
"hash": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ=="
2242-
}
2243-
},
22442244
"npm:@babel/runtime@7.28.3": {
22452245
"type": "npm",
22462246
"name": "npm:@babel/runtime@7.28.3",
@@ -2925,6 +2925,15 @@
29252925
"hash": "sha512-gSMdOh6tI3IJKZFqxfQwbTpskpME0CvxdxGM2tdglmf6ZPVDi0L4+KKIm+2dN8nzb8Ya1A8ZT+Ddq0KmZtwVQg=="
29262926
}
29272927
},
2928+
"npm:@fluentui/react-component-ref": {
2929+
"type": "npm",
2930+
"name": "npm:@fluentui/react-component-ref",
2931+
"data": {
2932+
"version": "0.63.1",
2933+
"packageName": "@fluentui/react-component-ref",
2934+
"hash": "sha512-8MkXX4+R3i80msdbD4rFpEB4WWq2UDvGwG386g3ckIWbekdvN9z2kWAd9OXhRGqB7QeOsoAGWocp6gAMCivRlw=="
2935+
}
2936+
},
29282937
"npm:@formatjs/ecma402-abstract": {
29292938
"type": "npm",
29302939
"name": "npm:@formatjs/ecma402-abstract",
@@ -21271,9 +21280,9 @@
2127121280
"type": "npm",
2127221281
"name": "npm:semantic-ui-react",
2127321282
"data": {
21274-
"version": "3.0.0-beta.2",
21283+
"version": "2.1.5",
2127521284
"packageName": "semantic-ui-react",
21276-
"hash": "sha512-BFqd7dGPgXPbIkWkIzkPrPRBElf/iB4NKOSFl5tZwMEaIyGQXbvtVWHyOW0sMD2A/qZPgY2Wl/19GDc9JOg3ng=="
21285+
"hash": "sha512-nIqmmUNpFHfovEb+RI2w3E2/maZQutd8UIWyRjf1SLse+XF51hI559xbz/sLN3O6RpLjr/echLOOXwKCirPy3Q=="
2127721286
}
2127821287
},
2127921288
"npm:semver-diff@2.1.0": {
@@ -30797,6 +30806,16 @@
3079730806
"target": "npm:@babel/runtime",
3079830807
"type": "static"
3079930808
},
30809+
{
30810+
"source": "npm:@fluentui/react-component-ref",
30811+
"target": "npm:@babel/runtime",
30812+
"type": "static"
30813+
},
30814+
{
30815+
"source": "npm:@fluentui/react-component-ref",
30816+
"target": "npm:react-is",
30817+
"type": "static"
30818+
},
3080030819
{
3080130820
"source": "npm:@formatjs/ecma402-abstract",
3080230821
"target": "npm:@formatjs/intl-localematcher",
@@ -64117,6 +64136,11 @@
6411764136
"target": "npm:@fluentui/react-component-event-listener",
6411864137
"type": "static"
6411964138
},
64139+
{
64140+
"source": "npm:semantic-ui-react",
64141+
"target": "npm:@fluentui/react-component-ref",
64142+
"type": "static"
64143+
},
6412064144
{
6412164145
"source": "npm:semantic-ui-react",
6412264146
"target": "npm:@popperjs/core",

0 commit comments

Comments
 (0)