@scottish-government/designsystem-react 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scottish-government/designsystem-react",
3
3
  "description": "A React/JSX implementation of the Scottish Government Design System",
4
- "version": "0.0.1",
4
+ "version": "0.1.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Scottish Government Digital Design System team",
@@ -1,96 +0,0 @@
1
- name: Versioned release
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- release_type:
7
- description: 'Release type'
8
- required: true
9
- type: choice
10
- options:
11
- - patch
12
- - minor
13
- - major
14
- - prepatch
15
- - preminor
16
- - premajor
17
- - prerelease
18
-
19
- jobs:
20
- build:
21
- runs-on: ubuntu-latest
22
-
23
- steps:
24
- - name: Checkout
25
- uses: actions/checkout@v4
26
-
27
- # Set up node and add the registry url
28
- - name: Setup Node.js
29
- uses: actions/setup-node@v3
30
- with:
31
- node-version: 18
32
- registry-url: 'https://registry.npmjs.org'
33
- always-auth: true
34
-
35
- # Install
36
- - name: Install
37
- run: npm ci
38
-
39
- # Test
40
- - name: Run tests
41
- run: npm run test
42
-
43
- # Configure Git
44
- - name: Git configuration
45
- run: |
46
- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
47
- git config --global user.name "GitHub Actions"
48
-
49
- # Set package version
50
- - name: Set package version
51
- if: startsWith(github.event.inputs.release_type, 'pre') != true
52
- run: |
53
- echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
54
- echo "RELEASE_TAG=latest" >> $GITHUB_ENV
55
- env:
56
- RELEASE_TYPE: ${{github.event.inputs.release_type}}
57
-
58
- # Set pre-release version
59
- - name: Set pre-release version
60
- if: startsWith(github.event.inputs.release_type, 'pre')
61
- run: |
62
- echo "NEW_VERSION=$(npm --no-git-tag-version --preid=beta version $RELEASE_TYPE)" >> $GITHUB_ENV
63
- echo "RELEASE_TAG=beta" >> $GITHUB_ENV
64
- env:
65
- RELEASE_TYPE: ${{github.event.inputs.release_type}}
66
-
67
- # Build release assets
68
- - name: Build release assets
69
- run: |
70
- npm run build
71
-
72
- ## Add release assets
73
- - name: Add release assets to commit
74
- run: |
75
- git add -f "dist/**/*"
76
-
77
- # Commit updated package.json
78
- - name: Commit package.json and create tag
79
- run: |
80
- git add "package.json"
81
- git add "package-lock.json"
82
- git commit -m "chore: release ${{env.NEW_VERSION}}"
83
- git tag ${{env.NEW_VERSION}}
84
-
85
- # Push to git repo
86
- - name: Push changes to git
87
- env:
88
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
89
- run: |
90
- git push origin && git push --tags
91
-
92
- # Publish to npm
93
- - name: Publish npm package
94
- run: npm publish --access public
95
- env:
96
- NODE_AUTH_TOKEN: ${{secrets.DS_REACT}}