0.17.0: Flexbox improvements/fixes #98
Workflow file for this run
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: Auto-generate docs and auto-publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
environment: Main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run build | |
- run: tar -czf build.tar.gz dist/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build.tar.gz | |
retention-days: 1 | |
overwrite: true | |
test: | |
environment: Main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run lint | |
- run: pnpm run test | |
generate-docs: | |
needs: [build, test] | |
environment: Main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run docs | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: tar -xf build.tar.gz dist/ | |
- run: mv dist docs/dist | |
- run: mv examples docs/examples | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'docs/' | |
deploy-docs: | |
if: startsWith(github.ref, 'refs/tags/releases/') | |
needs: generate-docs | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
publish-npm: | |
if: startsWith(github.ref, 'refs/tags/releases/') | |
needs: deploy-docs | |
environment: Main | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
registry-url: https://registry.npmjs.org/ | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: tar -xf build.tar.gz dist/ | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm pack | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
file: lazy-widgets-[0-9]*.[0-9]*.[0-9]*.tgz | |
file_glob: true | |
overwrite: true | |
- run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |