Skip to content

Commit ca59aa1

Browse files
authored
chore: Fix release script (material-components#5612)
1 parent e1387ff commit ca59aa1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/release.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ jobs:
3535
npm install
3636
- name: Check if release tag is already created
3737
id: vars
38-
# Sets action's output parameter using `set-output`.
39-
# See https://help.github.com/en/github/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-output-parameter-set-output
4038
run: |
4139
MDC_CURRENT_VERSION="v$(npm run version --silent)"
42-
# If empty then set `mdc_version_changed` variable to `true`
43-
[[ -z $(git tag -l "$MDC_CURRENT_VERSION") ]] && echo "::set-output name=mdc_version_changed::true"
40+
if [[ -z $(git tag -l "$MDC_CURRENT_VERSION") ]]; then
41+
echo "Proceeding to create new release"
42+
else
43+
echo "New release already created, exiting."
44+
exit 1
45+
fi
4446
- name: Build packages
45-
if: steps.vars.outputs.mdc_version_changed == true
4647
run: |
4748
npm run dist
4849
node scripts/cp-pkgs.js
4950
node scripts/verify-pkg-main.js
5051
- name: Create release tag
51-
if: steps.vars.outputs.mdc_version_changed == true
5252
run: |
5353
MDC_CURRENT_VERSION="v$(npm run version --silent)"
5454
git config --local user.email "action@github.com"
@@ -60,7 +60,6 @@ jobs:
6060
env:
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6262
- name: Publish to NPM registry
63-
if: steps.vars.outputs.mdc_version_changed == true
6463
run: npx lerna publish from-package --yes
6564
env:
6665
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"publish": {
88
"ignoreChanges": [
99
"*.md",
10-
"*.txt"
10+
"*.increment1"
1111
]
1212
}
1313
},

0 commit comments

Comments
 (0)