Skip to content

Commit 2a640ce

Browse files
authored
Merge pull request #115 from umbraco/Release/Patch-220128
2 parents 27d48bb + 0f16b55 commit 2a640ce

File tree

286 files changed

+12892
-7546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+12892
-7546
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
ignorePatterns: ['vite.*.js'],
2+
ignorePatterns: ['vite.*.js', 'src/**/*'],
33
root: true,
44
parser: '@typescript-eslint/parser',
55
plugins: ['@typescript-eslint', 'html', 'import'],
@@ -16,6 +16,7 @@ module.exports = {
1616
'@typescript-eslint/explicit-module-boundary-types': 'off',
1717
'@typescript-eslint/no-non-null-assertion': 'off',
1818
'@typescript-eslint/no-explicit-any': 'off',
19+
'@typescript-eslint/no-inferrable-types': 'off',
1920
'@typescript-eslint/ban-ts-comment': 'off', //TODO: Remove (maybe)
2021
'@typescript-eslint/ban-types': 'off', //TODO: Remove (maybe)
2122
},

.github/workflows/azure-static-web-apps-delightful-beach-055ecb503.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ on:
44
push:
55
branches:
66
- main
7+
# This is how azure builds staging environments
8+
pull_request:
9+
types: [opened, synchronize, reopened, closed]
10+
branches:
11+
- main
712

813
jobs:
914
test:
1015
# The type of runner that the job will run on
16+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
1117
runs-on: ubuntu-latest
1218

1319
strategy:
@@ -23,6 +29,7 @@ jobs:
2329
with:
2430
node-version: ${{ matrix.node-version }}
2531
- run: npm ci
32+
- run: npm run lint
2633
- run: npm run build:prod
2734

2835
build_and_deploy_job:

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ jobs:
3131
with:
3232
node-version: ${{ matrix.node-version }}
3333
- run: npm install
34+
- run: npm run lint
3435
- run: npm run build:prod

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ debug.log
3434
out-css
3535
*.log
3636
.eslintcache
37+
*.tgz
38+
39+
# old source
40+
/src/**/*

.husky/common.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
command_exists () {
2+
command -v "$1" >/dev/null 2>&1
3+
}
4+
5+
# Workaround for Windows 10, Git Bash and Yarn
6+
if command_exists winpty && test -t 1; then
7+
exec < /dev/tty
8+
fi

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
34

45
npx lint-staged

docs/RELEASE_INSTRUCTION.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# UI Library Release workflow
2+
3+
1. Create a new branch for the release. We need a good naming convention: `Release/<patch/minor/major>-<YYMMDD>` (example: `Release/Patch-220128`)
4+
1. Review new release PR (either [on GitHub](https://github.com/umbraco/Umbraco.UI/compare/) or through `npm run lerna:diff`)
5+
1. Make a PR from the new branch to the main branch
6+
1. Wait for GitHub checks to pass.
7+
1. Run `npm run lerna:version`
8+
1. Select new version number for every package in the terminal
9+
1. Confirm the new versions - **this step is irreversible**. It will create tags and commit those to the remote. [Check how to clear tags.](#How-to-clear-tags)
10+
1. Commit `package-lock.json` to your release branch
11+
1. Wait for GitHub checks to pass. There will be one check that fails and this is the one triggered by a commit made by `npm run lerna:version` command. This fails because it runs build with old `package-lock.json` that does not have updated versions of the packages. After you commit the new package-lock the check should pass.
12+
1. Merge PR into main - this will trigger two actions - `Publish`, and `Azure Static Web Apps CI/CD`. The `Publish` workflow is responsible for publishing packages to NPM. It will only publish the packages that have higher version that previously published ones. The azure workflow will build and publish UI library Storybook
13+
1. Merge main branch into dev branch
14+
15+
## How to clear tags
16+
17+
If something goes wrong during the publish workflow, you might end up with tag numbers not corresponding to the current versions of the packages. Tags are stored both on remote and on local repository.
18+
19+
1. Go to Github and remove all tags with higher versions then the last published version.
20+
2. Then delete all your local tags and replace them with the tags from the remote. To do that run the following inside your local repository.
21+
22+
OSX
23+
24+
```zsh
25+
git tag -l | xargs git tag -d
26+
git fetch --tags
27+
```
28+
29+
WINDOWS
30+
31+
```powershell
32+
git tag -l | %{git tag -d $_}
33+
git fetch --tags
34+
```

docs/images/UI.png

27.9 KB
Loading

0 commit comments

Comments
 (0)