docs(release): design system packages #314
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Den Haag website branch | |
| on: | |
| push: | |
| branches: | |
| - www.denhaag.nl | |
| pull_request: | |
| branches: | |
| - www.denhaag.nl | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: "20.11.x" | |
| - name: yarn install | |
| run: | | |
| npm install -g yarn | |
| yarn install --frozen-lockfile | |
| - name: run linters | |
| run: | | |
| yarn lint:css | |
| yarn lint:package | |
| yarn lint:js | |
| yarn lint:prettier | |
| - name: build library | |
| run: yarn build:library | |
| - name: typecheck storybook | |
| run: yarn typecheck:storybook | |
| - name: build storybook | |
| run: yarn build:storybook | |
| - name: Publish to Chromatic | |
| uses: chromaui/action@ac86f2ff0a458ffbce7b40698abd44c0fa34d4b6 # v13.3.3 | |
| if: | | |
| github.event.pull_request.draft == false && | |
| github.action != 'dependabot[bot]' | |
| with: | |
| autoAcceptChanges: www.denhaag.nl | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| storybookBuildDir: storybook-static | |
| publish-npm: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/www.denhaag.nl' | |
| environment: www.denhaag.nl | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: "20.11.x" | |
| - name: yarn install | |
| run: | | |
| npm install -g yarn | |
| yarn install --frozen-lockfile | |
| - name: build library | |
| run: yarn build | |
| - name: lerna version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
| GIT_AUTHOR_NAME: "Den Haag website" | |
| GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
| GIT_COMMITTER_NAME: "Den Haag website" | |
| run: | | |
| git push --set-upstream origin HEAD | |
| yarn release -- --yes --preid www-denhaag-nl | |
| - name: lerna publish | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_REGISTRY: "npm.pkg.github.com" | |
| NPM_SCOPE: "@gemeente-denhaag" | |
| run: | | |
| npm config set "${NPM_SCOPE}:registry" "https://${NPM_REGISTRY}" | |
| npm config set "//${NPM_REGISTRY}/:_authToken" "${NPM_TOKEN}" | |
| npm config set access public | |
| npm run publish -- --no-verify-access --yes | |
| npm config delete "//${NPM_REGISTRY}/:_authToken" |