Skip to content

chore: πŸ€– update versions #718

chore: πŸ€– update versions

chore: πŸ€– update versions #718

Workflow file for this run

name: Release
on:
pull_request:
types: [opened, synchronize, reopened, closed, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: validate
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
timeout-minutes: 20
steps:
- name: ⬇ Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: βŽ” Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: βŽ” Setup Node.js ${{ matrix.node-version }} for Github Packages
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com/'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: πŸ“₯ Install dependencies
run: pnpm install --frozen-lockfile
- name: πŸ— Build
run: pnpm clean && pnpm build
- name: πŸ” Verify types
run: pnpm type-check
- name: πŸ’… Verify format
run: pnpm format --check --no-write
- name: πŸ•΅οΈ Lint
run: pnpm lint:prod
- name: πŸ›‘οΈ Test
run: pnpm test
- name: πŸ“ Report bundle size
if: github.event.pull_request.merged == false
uses: andresz1/size-limit-action@v1
continue-on-error: true
with:
github_token: ${{ secrets.GPR_TOKEN }}
release-npm:
name: release-npm
needs: validate
runs-on: ubuntu-latest
if:
github.event_name == 'pull_request' && github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main'
strategy:
matrix:
node-version: ['18']
timeout-minutes: 20
steps:
- name: ⬇ Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: βŽ” Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: βŽ” Setup Node.js ${{ matrix.node-version }} for NPM
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: βŽ” Setup .npmrc (NPM)
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}" >> ~/.npmrc
- name: πŸ“₯ Install dependencies
run: pnpm install --frozen-lockfile
- name: πŸš€ Create Release Pull Request or Release to NPM
uses: changesets/action@v1
id: changesetsId
with:
commit: 'chore: πŸ€– update versions'
title: 'chore: πŸ€– update versions'
publish: pnpm release:publish
version: pnpm release:version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
release-gpr:
name: release-gpr
needs: [validate, release-npm]
if: >
github.event_name == 'pull_request' && github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'changeset-release/main'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
timeout-minutes: 20
steps:
- name: ⬇ Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: βŽ” Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Remove existing .npmrc for NPM
run: rm -f "$HOME/.npmrc"
- name: βŽ” Setup Node.js ${{ matrix.node-version }} for Github Packages
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com/'
- name: πŸ“₯ Install dependencies for Github Packages
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }}
- name: πŸš€ Release to Github Packages
uses: changesets/action@v1
with:
commit: 'chore: update versions'
title: 'chore: update versions'
publish: pnpm release:publish
version: pnpm release:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}