Skip to content

fix(action): pack action (#104) #74

fix(action): pack action (#104)

fix(action): pack action (#104) #74

Workflow file for this run

on:
push:
branches:
- main
name: Build, test, release
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: whop
concurrency:
group: "release"
cancel-in-progress: false
permissions:
pull-requests: write
jobs:
release:
name: Publish to npm and release on github
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check package.json for version increase
id: check
uses: ./
with:
action: check
token: ${{ github.token }}
- uses: pnpm/action-setup@v4
if: steps.check.outputs.can-publish == 'true'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: pnpm
if: steps.check.outputs.can-publish == 'true'
- name: Install all packages
run: pnpm i
if: steps.check.outputs.can-publish == 'true'
- name: Build
run: pnpm turbo build
if: steps.check.outputs.can-publish == 'true'
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
if: steps.check.outputs.can-publish == 'true'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run turbo release flow
run: pnpm turbo release ${{ steps.check.outputs.filter }}
if: steps.check.outputs.can-publish == 'true'
- name: Github Release
id: release
uses: ./
with:
action: release
token: ${{ github.token }}
version: ${{ steps.check.outputs.version }}
if: steps.check.outputs.can-publish == 'true'
- name: Sync auto-release PRs
uses: ./
with:
action: sync
token: ${{ github.token }}
published: ${{ steps.release.outputs.published }}