mirror of
https://github.com/renovatebot/pre-commit-hooks.git
synced 2026-04-15 19:09:54 +00:00
ci: create release instead of tag (#247)
This commit is contained in:
parent
13228587dc
commit
6824fc1bae
1 changed files with 13 additions and 7 deletions
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
--ref="${GITHUB_SHA}"
|
--ref="${GITHUB_SHA}"
|
||||||
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
|
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
|
||||||
|
|
||||||
tag:
|
release:
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
needs: [test]
|
needs: [test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -44,8 +44,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
|
||||||
with:
|
|
||||||
fetch-depth: 0 # all tags
|
|
||||||
|
|
||||||
- name: Get Renovate version
|
- name: Get Renovate version
|
||||||
id: get-renovate-version
|
id: get-renovate-version
|
||||||
|
|
@ -56,9 +54,17 @@ jobs:
|
||||||
'.[]|select(.id=="renovate-config-validator")|.additional_dependencies[0]|split("@").[1]'
|
'.[]|select(.id=="renovate-config-validator")|.additional_dependencies[0]|split("@").[1]'
|
||||||
.pre-commit-hooks.yaml
|
.pre-commit-hooks.yaml
|
||||||
|
|
||||||
- name: Create tag
|
- name: Create release
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ steps.get-renovate-version.outputs.result }}
|
if ! gh release view "${TAG}" >/dev/null; then
|
||||||
if ! git show-ref --tags "${TAG}" --quiet; then
|
gh release create "${TAG}" \
|
||||||
git tag "${TAG}" && git push origin "${TAG}"
|
--notes "See https://github.com/renovatebot/renovate/releases/tag/${TAG} for more changes" \
|
||||||
|
--target "${TARGET}" \
|
||||||
|
--title "${TAG}"
|
||||||
|
else
|
||||||
|
echo 'release already exists'
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TAG: ${{ steps.get-renovate-version.outputs.result }}
|
||||||
|
TARGET: ${{ github.sha }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue