fix dgt-components: build errors #572
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: | |
- main | |
- next | |
- release | |
- release/* | |
- feat/* | |
- fix/* | |
- test/* | |
- chore/* | |
- build/* | |
tags: | |
- '*' | |
env: | |
NPM_TOKEN: ${{secrets.GA_TOKEN}} | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Extract tag | |
id: extract-tag | |
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Check tag | |
run: echo ${{ steps.extract-tag.outputs.tag }} | |
- name: Extract branch | |
id: extract-branch | |
run: echo "branch=${GITHUB_REF/refs\/heads\//}" >> $GITHUB_OUTPUT | |
- name: Check branch | |
run: echo ${{ steps.extract-branch.outputs.branch }} | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
registry-url: https://npm.pkg.github.com | |
- run: npm run bootstrap | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} | |
- run: npm run build:all | |
- run: npm run lint:all | |
- run: npm run test:ci | |
release: | |
name: Create release | |
needs: test | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body_path: CHANGELOG.md | |
draft: false | |
prerelease: false | |
publish-npm: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: release | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
registry-url: https://npm.pkg.github.com/ | |
- name: Install dependencies | |
run: npm run bootstrap | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} | |
- run: npm run build:all | |
- run: | | |
cd packages/dgt-theme | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} | |
- run: | | |
cd packages/dgt-utils-core | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} | |
- run: | | |
packages/dgt-utils | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} | |
- run: | | |
packages/dgt-components | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GA_TOKEN }} |