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

chore: fix npm release script when its running on a multi line commit message #1676

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/manual-release-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
NPM_USERNAME: ${{secrets.NPM_USERNAME}}
run: npm run release -- --prRelease
- name: Get commit message
run: |
echo "commmit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
run: | # puts the first line of the last commit message to the commmit_message env var
echo "commmit_message=$(git log --format=%B -n 1 ${{ github.event.after }} | head -n 1)" >> $GITHUB_ENV
- name: Set up git identity
if: "startsWith(env.commmit_message, 'chore(release)')"
run: git config --global user.name "instructure-ui-ci" && git config --global user.email "[email protected]"
# -a -m is needed to make the tag "annotated". Lerna needs annotated tags to work correctly with verisons
# -a -m is needed to make the tag "annotated". Lerna needs annotated tags to work correctly with versions
- name: Add tag
if: "startsWith(env.commmit_message, 'chore(release)')"
run: git tag -a v$(./.github/workflows/calculateVersion.sh) -m v$(./.github/workflows/calculateVersion.sh)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-release-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
NPM_USERNAME: ${{secrets.NPM_USERNAME}}
run: npm run release
- name: Get commit message
run: |
echo "commmit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
run: | # puts the first line of the last commit message to the commmit_message env var
echo "commmit_message=$(git log --format=%B -n 1 ${{ github.event.after }} | head -n 1)" >> $GITHUB_ENV
- name: Set up git identity
if: "startsWith(env.commmit_message, 'chore(release)')"
run: git config --global user.name "instructure-ui-ci" && git config --global user.email "[email protected]"
# -a -m is needed to make the tag "annotated". Lerna needs annotated tags to work correctly with verisons
# -a -m is needed to make the tag "annotated". Lerna needs annotated tags to work correctly with versions
- name: Add tag
if: "startsWith(env.commmit_message, 'chore(release)')"
run: git tag -a v$(./.github/workflows/calculateVersion.sh) -m v$(./.github/workflows/calculateVersion.sh)
Expand Down
Loading