Skip to content

chore(deps): update dependency @types/react to v18.2.23 #40

chore(deps): update dependency @types/react to v18.2.23

chore(deps): update dependency @types/react to v18.2.23 #40

Workflow file for this run

name: Test and Publish
on: push
jobs:
unit-test-and-style-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup caching
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: cache-${{ runner.OS }}-${{ hashFiles('**/*.lock') }}
restore-keys: |
cache-${{ runner.OS }}-
- name: Install dependencies
run: |
yarn
- name: Run tests
env:
INFO_USER_ID: ${{ secrets.INFO_USER_ID }}
INFO_PASSWORD: ${{ secrets.INFO_PASSWORD }}
run: |
yarn workspace @thu-info/lib lint
# yarn workspace @thu-info/lib test
build-and-publish:
needs: unit-test-and-style-check
runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags')
if: false
steps:
- uses: actions/checkout@v4
- name: Setup caching
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: cache-${{ runner.OS }}-${{ hashFiles('**/*.lock') }}
restore-keys: |
cache-${{ runner.OS }}-
- name: Install dependencies
run: |
yarn
- name: Build library
run: |
yarn workspace @thu-info/lib build
- name: Prepare for publishing
id: prepare_publish
run: |
export ref='${{ github.ref }}'
export tag=${ref:11}
echo "::set-output name=tag::$tag"
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ steps.prepare_publish.outputs.tag }}
run: |
yarn workspace @thu-info/lib publish --new-version $TAG
- name: Build demo
run: |
yarn workspace @thu-info/lib build-dist
zip -r demo.zip ./packages/thu-info-lib/demo/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: ./packages/thu-info-lib/release
- name: Upload demo
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: demo.zip
asset_name: demo.zip
asset_content_type: application/zip