Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix git author error while pushing new versions #6

Merged
merged 2 commits into from
Apr 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 7 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: yarn test:eslint-plugin-axios

update-versions:
name: 'Update package versions'
name: 'Publish to NPM'

needs: ['prettier', 'eslint', 'test-eslint-plugin-axios']

Expand All @@ -82,6 +82,12 @@ jobs:
- uses: actions/checkout@v3
with:
ref: main
# Token with higher permissions is required for lerna to push versions
token: ${{ secrets.GITHUB_TOKEN }}

# Fetch all history for all tags and branches in this job because lerna needs it
- run: |
git fetch --prune --unshallow

- name: Setup Node.js
uses: actions/setup-node@v3
Expand All @@ -96,29 +102,6 @@ jobs:
- name: Update Versions
run: npx lerna version --conventional-commits --exact --yes

publish:
name: 'Publish to NPM'

needs: ['update-versions']

if: "github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'skip ci')"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
ref: main

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'

- name: Installing dependencies
run: yarn install --frozen-lockfile

- name: Publish to NPM
run: npx lerna publish --yes
env:
Expand Down