Skip to content

Commit b0d5923

Browse files
committed
👷
1 parent 672fe6b commit b0d5923

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

‎.github/workflows/release.yml‎

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description:
1212
description: "Version description"
1313
type: string
14-
prerelease:
15-
description: "Prerelease"
16-
default: false
17-
required: true
18-
type: boolean
1914

2015
jobs:
2116
release:
@@ -60,17 +55,29 @@ jobs:
6055
- name: bump package version
6156
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
6257

63-
- name: push new commit
64-
uses: EndBug/add-and-commit@v7
65-
with:
66-
add: package.json svg-only/dist action.yml
67-
message: 📦 ${{ github.event.inputs.version }}
68-
tag: v${{ github.event.inputs.version }}
58+
- name: push new build, tag version and push
59+
id: push-tags
60+
run: |
61+
VERSION=${{ github.event.inputs.version }}
62+
63+
git add package.json svg-only/dist action.yml
64+
git commit -m "📦 $VERSION"
65+
git tag v$VERSION
66+
git push origin master --tags
67+
68+
if [[ "$VERSION" =~ ^\d+\.\d+\.\d+$ ]] then
69+
git tag --force v$( echo VERSION | cut -d. -f 1-1 )
70+
git tag --force v$( echo VERSION | cut -d. -f 1-2 )
71+
git push origin --tags --force
72+
echo ::set-output name=prerelease::false
73+
else
74+
echo ::set-output name=prerelease::true
75+
fi
6976
7077
- uses: actions/create-release@v1
7178
env:
7279
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7380
with:
7481
tag_name: v${{ github.event.inputs.version }}
7582
body: ${{ github.event.inputs.description }}
76-
prerelease: ${{ github.event.inputs.prerelease }}
83+
prerelease: ${{ steps.push-tags.outputs.prerelease }}

‎tsconfig.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"noUnusedLocals": true,
77
"noUnusedParameters": true,
88
"forceConsistentCasingInFileNames": true,
9-
"esModuleInterop": true
9+
"esModuleInterop": true,
10+
"moduleResolution": "node"
1011
},
1112
"exclude": ["node_modules"]
1213
}

0 commit comments

Comments
 (0)