👷
This commit is contained in:
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@@ -11,11 +11,6 @@ on:
|
|||||||
description:
|
description:
|
||||||
description: "Version description"
|
description: "Version description"
|
||||||
type: string
|
type: string
|
||||||
prerelease:
|
|
||||||
description: "Prerelease"
|
|
||||||
default: false
|
|
||||||
required: true
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -60,12 +55,24 @@ jobs:
|
|||||||
- name: bump package version
|
- name: bump package version
|
||||||
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
|
run: yarn version --no-git-tag-version --new-version ${{ github.event.inputs.version }}
|
||||||
|
|
||||||
- name: push new commit
|
- name: push new build, tag version and push
|
||||||
uses: EndBug/add-and-commit@v7
|
id: push-tags
|
||||||
with:
|
run: |
|
||||||
add: package.json svg-only/dist action.yml
|
VERSION=${{ github.event.inputs.version }}
|
||||||
message: 📦 ${{ github.event.inputs.version }}
|
|
||||||
tag: v${{ github.event.inputs.version }}
|
git add package.json svg-only/dist action.yml
|
||||||
|
git commit -m "📦 $VERSION"
|
||||||
|
git tag v$VERSION
|
||||||
|
git push origin master --tags
|
||||||
|
|
||||||
|
if [[ "$VERSION" =~ ^\d+\.\d+\.\d+$ ]] then
|
||||||
|
git tag --force v$( echo VERSION | cut -d. -f 1-1 )
|
||||||
|
git tag --force v$( echo VERSION | cut -d. -f 1-2 )
|
||||||
|
git push origin --tags --force
|
||||||
|
echo ::set-output name=prerelease::false
|
||||||
|
else
|
||||||
|
echo ::set-output name=prerelease::true
|
||||||
|
fi
|
||||||
|
|
||||||
- uses: actions/create-release@v1
|
- uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
@@ -73,4 +80,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: v${{ github.event.inputs.version }}
|
tag_name: v${{ github.event.inputs.version }}
|
||||||
body: ${{ github.event.inputs.description }}
|
body: ${{ github.event.inputs.description }}
|
||||||
prerelease: ${{ github.event.inputs.prerelease }}
|
prerelease: ${{ steps.push-tags.outputs.prerelease }}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node"
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user