diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fca91ae60..cee013da4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,17 +2,26 @@ on: pull_request: branches: - master + # - development jobs: build-and-publish: name: Build Jopi & Publish New Version in NPM runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + - uses: actions/checkout@master + - name: reattach HEAD to Head Ref + run: git checkout "$(echo ${{ github.head_ref }} | sed -E 's|refs/[a-zA-Z]+/||')" + if: github.head_ref != '' + - name: reattach HEAD to Ref + run: git checkout "$(echo ${{ github.ref }} | sed -E 's|refs/[a-zA-Z]+/||')" + if: github.head_ref == '' + + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} #- name: Configure git credentials # uses: OleksiyRudenko/gha-git-credentials@v2-latest @@ -29,10 +38,10 @@ jobs: run: | yarn install - - name: Set Current Version - run: | - CURRENT_VERSION=$(node -p 'require("./lerna.json").version') - echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV + # - name: Set Current Version + # run: | + # CURRENT_VERSION=$(node -p 'require("./lerna.json").version') + # echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV - name: Run tests run: yarn test @@ -54,7 +63,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd node_modules/.bin - lerna version patch --yes + yarn lerna publish --yes --registry https://registry.npmjs.org/:_authToken=${NPM_TOKEN} + # lerna version patch --yes - name: Publish New Jopi version to NPM env: diff --git a/lerna.json b/lerna.json index e5c364e0a..416251a25 100644 --- a/lerna.json +++ b/lerna.json @@ -1,7 +1,6 @@ { - "packages": ["packages/*"], "npmClient": "yarn", - "useWorkspaces": true, - "version": "independent", + "private": true, + "version": "6.6.2", "command.publish.verifyAccess": false } \ No newline at end of file diff --git a/package.json b/package.json index 7281060bb..be008508d 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "jest-haste-map": "^29.6.4", "jest-resolve": "^29.6.4", "jest-styled-components": "^7.1.1", - "lerna": "^6.6.2", + "lerna": "6.6.2", "lint-staged": "^12.3.8", "postcss": "^8.4.12", "postcss-syntax": "^0.36.2",