fix_avatars_in_cards #451
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: π’ Test & Release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
pull-requests: write | |
pages: write | |
id-token: write | |
jobs: | |
test: | |
name: π§ͺ tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: π οΈ Prepare pnpm workspace | |
uses: dyne/pnpm@main | |
with: | |
node-version: 20 | |
pnpm-version: 8 | |
- run: echo "PUPPETEER_VERSION=$(pnpm ls puppeteer --json | jq '.[0].devDependencies.puppeteer.version' -r)" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/puppeteer/chrome | |
key: ${{ runner.os }}-puppeteer-chromium-${{ env.PUPPETEER_VERSION }} | |
restore-keys: ${{ runner.os }}-puppeteer-chromium- | |
- name: install chromium | |
run: | | |
# very bad, but I do not found any other way to run | |
# a postinstall script of an already installed package | |
pnpm -C node_modules/puppeteer run postinstall | |
env: | |
PUPPETEER_DOWNLOAD_BASE_URL: https://storage.googleapis.com/chrome-for-testing-public | |
- name: π§ͺ Run the tests | |
run: pnpm run test | |
docs: | |
name: π docs | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: π οΈ Prepare pnpm workspace | |
uses: dyne/pnpm@main | |
with: | |
node-version: 20 | |
pnpm-version: 8 | |
- uses: bitovi/[email protected] | |
with: | |
install_command: pnpm install | |
build_command: pnpm run build && pnpm run build-storybook | |
path: storybook-static | |
release-please: | |
name: π¦ release | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
release-type: node | |
token: ${{ secrets.PAT }} | |
- uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: pnpm/action-setup@v2 | |
if: ${{ steps.release.outputs.release_created }} | |
with: | |
version: 8 | |
- run: | | |
pnpm install | |
pnpm build | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
if: ${{ steps.release.outputs.release_created }} |