intuit / auto

Generate releases based on semantic version labels on pull requests.
https://intuit.github.io/auto/
MIT License
2.28k stars 205 forks source link

Github action failing when running auto shipit #2481

Open Snivio opened 2 weeks ago

Snivio commented 2 weeks ago

Im using the following workflow

name: Release

on: [push, workflow_dispatch]

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    permissions:
      contents: read
      issues: read
      packages: write
      pull-requests: write
    #    if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Prepare repository
        run: git fetch --prune

      - name: Unset header
        run: git config --local --unset http.https://github.com/.extraheader

      - name: Use Node
        uses: actions/setup-node@v3
        with:
          node-version-file: .nvmrc
          registry-url: "https://npm.pkg.github.com"
          scope: "@********"

      - name: Cache node modules
        uses: actions/cache@v1
        with:
          path: node_modules
          key: yarn-deps-${{ hashFiles('yarn.lock', 'package-lock.json', 'package.json') }}
          restore-keys: |
            yarn-deps-${{ hashFiles('yarn.lock', 'package-lock.json', 'package.json') }}

      - name: Create Release
        env:
          GITHUB_TOKEN: ${{ secrets.GH_REPO_PACKAGES_PAT }}
          NODE_AUTH_TOKEN: ${{ secrets.GH_REPO_PACKAGES_PAT }}
        run: |
          yarn install --frozen-lockfile
          yarn build
          npx auto@11 shipit

but the action fails with this

Error: Running command 'npx' with args [lerna, publish, 1.4.7--canary.119.47fcfe8.0, --dist-tag, canary, --registry, https://registry.npmjs.org/, --force-publish, --yes, --no-git-reset, --no-git-tag-version, --exact, --no-verify-access] failed
.
.
.
.
.
Error: Process completed with exit code 1.

any suggestions for different config with auto or lerna

lerna.json

{
  "version": "1.4.6",
  "packages": [
    "packages/*"
  ],
  "npmClient": "yarn",
  "publishConfig": {
    "access": "public"
  },
  "lerna": "2.9.0"
}

and package.json

{
  "name": "amplience",
  "version": "1.0.0",
  "description": "",
  "private": true,
  "workspaces": [
    "packages/*"
  ],
  "scripts": {
    "build": "lerna run build",
    "clean-modules": "rimraf node_modules"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/express": "4.17.9",
    "@types/node": "14.14.11",
    "auto": "10.46.0",
    "lerna": "7.2.0",
    "nodemon": "2.0.22",
    "tslint": "6.1.3",
    "typescript": "4.9.5"
  },
  "dependencies": {}
}