File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CD Build and Publish to NPM
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v1
13+
14+ - name : Yarn Install
15+ run : yarn
16+
17+ - name : Lint
18+ run : yarn lint
19+
20+ - name : Jest Tests
21+ run : yarn test:ci
22+
23+ - name : Typescript build
24+ run : yarn build
25+
26+ - name : Set Version to Release Tag Name
27+ run : |
28+ yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version
29+
30+ - name : Publish to npm, publish pre-release as beta
31+ uses : JS-DevTools/npm-publish@v1
32+ with :
33+ token : ${{ secrets.NPM_TOKEN }}
34+ dry-run : true
35+ tag : ${{ github.event.release.prerelease && 'beta' || 'latest' }}
Original file line number Diff line number Diff line change 11# NHS.UK React Components
22
3+ - [ NHS.UK React Components] ( #nhsuk-react-components )
4+ - [ Coming from 0.x?] ( #coming-from-0x )
5+ - [ Installation] ( #installation )
6+ - [ Usage] ( #usage )
7+ - [ Storybook] ( #storybook )
8+ - [ Maintainers] ( #maintainers )
9+ - [ Preparing Releases] ( #preparing-releases )
10+
311NHS.UK Frontend ported to React
412
513[ ![ GitHub Actions CI Status] ( https://github.com/NHSDigital/nhsuk-react-components/workflows/CI/badge.svg )] ( https://github.com/NHSDigital/nhsuk-react-components/actions?query=workflow%3A%22CI+Build%22+branch%3Amain ) [ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-airbnb-brightgreen.svg )] ( https://github.com/airbnb/javascript ) [ ![ Bundle Size] ( https://img.shields.io/bundlephobia/minzip/nhsuk-react-components.svg )] ( https://bundlephobia.com/result?p=nhsuk-react-components )
@@ -47,3 +55,14 @@ A storybook containing all of the components and their usage can be found [here]
4755- Thomas Judd-Cooper ([ GitHub] ( https://github.com/tomdango ) )
4856- Sam Brown ([ GitHub] ( https://github.com/samueldavidbrown ) )
4957- Luke Pearson ([ GitHub] ( https://github.com/lukepearson ) )
58+
59+ ### Preparing Releases
60+
61+ Releases run in CI using github actions.
62+
63+ To prepare a release create a new release TAG in github with your release version.
64+
65+ > ` NPM_TOKEN ` should be stored in the repositories [ secrets in GitHub] ( https://github.com/NHSDigital/nhsuk-react-components/settings/secrets/actions )
66+
67+ - Create a new release with a tag like ` major.minor.patch ` against main.
68+ - If the change is a ` beta ` then select ` pre-release ` as true, this will make the ` tag ` point at ` beta ` . Otherwise the tag will be ` latest ` .
You can’t perform that action at this time.
0 commit comments