diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b622f0d7..e81d0c094 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -148,7 +148,7 @@ jobs: run: | npm install npm run --if-present build - - run: npx xvfb-maybe npm run --if-present test:electron-main --bail + - run: npx xvfb-maybe npm run --if-present test:electron-main -- --bail test-electron-renderer: needs: check @@ -175,12 +175,12 @@ jobs: run: | npm install npm run --if-present build - - run: npx xvfb-maybe npm run --if-present test:electron-renderer --bail + - run: npx xvfb-maybe npm run --if-present test:electron-renderer -- --bail release: needs: [test-node, test-chrome, test-firefox, test-electron-main] runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.author.name, 'Github Actions') steps: - uses: actions/checkout@v2.4.0 with: @@ -205,7 +205,16 @@ jobs: run: | npm install npm run --if-present build - - run: npm run --if-present release + - run: | + git config --global user.email "actions@github.com" + git config --global user.name "Github Actions" + if [[ -n "${NPM_TOKEN}" ]]; then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc + fi + if [[ -n "${DOCKER_TOKEN}" ]] && [[ -n "${DOCKER_USERNAME}" ]]; then + echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin + fi + npm run --if-present release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/lerna.json b/lerna.json index 12511d5b5..16de03835 100644 --- a/lerna.json +++ b/lerna.json @@ -14,8 +14,7 @@ "publish": { "message": "chore: publish", "createRelease": "github", - "conventionalCommits": true, - "verifyAccess": false + "conventionalCommits": true }, "version": { "private": false diff --git a/package.json b/package.json index a20f3e0c0..345d519b0 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "lerna run build", "lint": "lerna run lint", "dep-check": "lerna run dep-check", - "release": "lerna run build && lerna publish --force-publish --yes" + "release": "lerna publish --yes --loglevel silly 2>&1" }, "bugs": "https://github.com/libp2p/js-libp2p-interfaces/issues", "homepage": "https://github.com/libp2p/js-libp2p-interfaces#readme",