Skip to content

Commit

Permalink
fix(publish): ensure we commit unstaged files first
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlc03 committed Jan 11, 2024
1 parent a13fc76 commit 42cd197
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master, dev]
branches: [dev]
pull_request:

env:
Expand Down Expand Up @@ -43,6 +43,11 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
# Depending on the STATE_TREE_DEPTH param, there
# might be changes in the EmptyBallotRoots.sol file
git add contracts/contracts/trees/EmptyBallotRoots.sol
git diff --staged --quiet || git commit -m "Commit changes before publishing"
lerna version 0.0.0-ci.$(git rev-parse --short HEAD) --no-push --yes
lerna publish from-git --dist-tag ci --yes
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
- name: Publish NPM
run: |
# Depending on the STATE_TREE_DEPTH param, there
# might be changes in the EmptyBallotRoots.sol file
git add contracts/contracts/trees/EmptyBallotRoots.sol
git diff --staged --quiet || git commit -m "Commit changes before publishing"
npx lerna publish from-git --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 42cd197

Please sign in to comment.