Skip to content

Commit a1fd6d7

Browse files
committed
Push with right v
1 parent b7bc865 commit a1fd6d7

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,18 @@ jobs:
210210
echo "version=$(npm view @davesnx/styled-ppx@nightly version)" >> $GITHUB_OUTPUT
211211
212212
- name: Release (@davesnx/styled-ppx) package
213-
if: ${{ success() && github.event_name != 'pull_request' }}
213+
if: ${{ success() && startsWith(github.ref, 'refs/tags/') }}
214214
working-directory: ./_release
215215
run: |
216216
npm config set scope "@davesnx"
217+
VERSION="${GITHUB_REF_NAME#v}"
217218
REMOTE=$(npm view @davesnx/styled-ppx version)
218-
CURRENT=$(jq -r '.version' package.json)
219-
if [ "$REMOTE" != "$CURRENT" ]
219+
if [ "$REMOTE" != "$VERSION" ]
220220
then
221+
npm version "$VERSION" --no-git-tag-version
221222
npm publish --access public
222223
else
223-
echo "New version and remote version are equal, nothing to publish"
224+
echo "Version $VERSION already published, skipping"
224225
fi
225226
226227
- name: Comment on PR with nightly version

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@davesnx/styled-ppx",
3-
"version": "0.56.0",
3+
"version": "0.0.0",
44
"description": "Typed styled components in ReScript",
55
"author": "David Sancho <[email protected]>",
66
"license": "BSD-2",

0 commit comments

Comments
 (0)