Skip to content

1.3.12

1.3.12 #19

name: Publish New Release
on:
release:
types: [created]
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/run-tests
with:
node-version: ${{ matrix.node-version }}
publish-npm:
needs: run-tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- run: sudo apt-get install jq
- run: jq ".version=\"${GITHUB_REF#refs/*/}\"" package.json > package-new.json && mv package-new.json package.json
- run: cat package.json
- run: npm i -g pnpm
- run: pnpm i
- run: pnpm publish-npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
deploy-demo:
needs: publish-npm
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g pnpm
- run: pnpm i
- run: pnpm --prefix demo i
- run: pnpm --prefix demo i atomic-spinner@latest
- name: Set Github identity
run: |
git config user.email "[email protected]"
git config user.name "github-actions-bot"
- name: Deploy to Github Pages
run: |
pnpm build-demo
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d demo/build -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}