Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
at main 85 lines 2.3 kB view raw
1name: Release 2on: 3 push: 4 branches: 5 - main 6 7jobs: 8 release: 9 name: Release 10 runs-on: ubuntu-24.04 11 timeout-minutes: 20 12 permissions: 13 contents: write 14 id-token: write 15 issues: write 16 repository-projects: write 17 deployments: write 18 packages: write 19 pull-requests: write 20 steps: 21 - name: Checkout Repo 22 uses: actions/checkout@v4 23 with: 24 fetch-depth: 0 25 26 - name: Setup Node 27 uses: actions/setup-node@v4 28 with: 29 node-version: 20 30 registry-url: "https://registry.npmjs.org" 31 32 - name: Update npm 33 run: npm install -g npm@latest 34 35 - name: Setup pnpm 36 uses: pnpm/action-setup@v3 37 with: 38 version: 9 39 run_install: false 40 41 - name: Get pnpm store directory 42 id: pnpm-store 43 run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT 44 45 - name: Use pnpm store 46 uses: actions/cache@v4 47 id: pnpm-cache 48 with: 49 path: | 50 ~/.cache/Cypress 51 ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} 52 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} 53 restore-keys: | 54 ${{ runner.os }}-pnpm- 55 56 - name: Install Dependencies 57 run: pnpm install 58 59 - name: PR or Publish 60 id: changesets 61 uses: changesets/action@v1.5.3 62 with: 63 version: pnpm changeset:version 64 publish: pnpm changeset:publish 65 env: 66 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 67 68 - name: Notify discord 69 id: discord-msg 70 if: steps.changesets.outputs.published == 'true' 71 uses: ./.github/actions/discord-message 72 with: 73 publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} 74 env: 75 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 76 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} 77 78 - name: Publish Prerelease 79 if: steps.changesets.outputs.published != 'true' 80 env: 81 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 82 run: | 83 git reset --hard origin/main 84 pnpm changeset version --no-git-tag --snapshot canary 85 pnpm changeset publish --no-git-tag --snapshot canary --tag canary