refactor: use @manypkg/get-packages
#35
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: Release | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
# test: | |
# name: Test | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Init | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 2 | |
# - name: Install pnpm | |
# uses: pnpm/[email protected] | |
# - name: Setup Node | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# cache: "pnpm" | |
# - name: Install dependencies | |
# run: pnpm install | |
# - name: Run tests | |
# run: pnpm test | |
# - name: Build | |
# run: pnpm build | |
release-branch: | |
name: Publish branch | |
runs-on: ubuntu-latest | |
# needs: test | |
if: ${{ github.event_name == 'push' }} | |
environment: Production | |
steps: | |
- uses: actions/checkout@v3 | |
name: Init | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT_CLASSIC }} | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Publish to npm and GitHub | |
run: pnpm build && pnpm release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_PAT_CLASSIC }} |