Skip to content

refactor: add js optics #32

refactor: add js optics

refactor: add js optics #32

name: Test and release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.7
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm turbo test
release:
name: Release
runs-on: ubuntu-latest
needs: [test]
if: ${{ needs.test.result == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup SSH keys
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: github.com
- name: Setup git user
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8.6.7
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Setup turbo cache
uses: actions/cache@v3
with:
path: '.turbo'
key: turbo-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.ref_name }}-
turbo-main-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Set NPM registry
run: npm config set //npm.pkg.github/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm exec turbo build deploy