ci: try fixing cypress #50
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: Version and publish packages with changesets | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
version: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Install dependencies with pnpm | |
uses: ./.github/actions/pnpm | |
- name: Build & test | |
uses: ./.github/actions/build-test | |
- name: Setup .npmrc | |
run: | | |
cat << EOF > "$HOME/.npmrc" | |
//registry.npmjs.org/:_authToken=$NPM_TOKEN | |
//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN | |
@awesome-org:registry=https://registry.npmjs.org/ | |
@teemukoivisto:registry=https://npm.pkg.github.com/ | |
EOF | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOME: ${{ github.workspace }} | |
- name: Create and publish versions | |
uses: changesets/action@v1 | |
with: | |
version: pnpm ci:version | |
commit: 'chore(changeset): version update' | |
title: 'chore(changeset): version update' | |
publish: pnpm ci:publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOME: ${{ github.workspace }} |