ci: do not auto create version tags on push to master
This commit is contained in:
parent
abe8146631
commit
c498e148b8
1 changed files with 0 additions and 53 deletions
53
.github/workflows/create-tag.yml
vendored
53
.github/workflows/create-tag.yml
vendored
|
|
@ -1,53 +0,0 @@
|
||||||
name: Create tag
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- release/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-tag:
|
|
||||||
if: ${{ vars.CREATE_TAGS }}
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
# Fetch all tags
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Read version file
|
|
||||||
run: echo "CURRENT_VERSION=$(cat VERSION)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Override stage
|
|
||||||
if: ${{ !startsWith(github.ref, 'refs/heads/release') }}
|
|
||||||
run: echo "OVERRIDE_STAGE=snapshot" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Get next version
|
|
||||||
id: next-version
|
|
||||||
uses: symless/actions/next-version@master
|
|
||||||
with:
|
|
||||||
current-version: ${{ env.CURRENT_VERSION }}
|
|
||||||
override-stage: ${{ env.OVERRIDE_STAGE }}
|
|
||||||
|
|
||||||
- name: Create and push Git tag
|
|
||||||
run: |
|
|
||||||
git tag ${{ steps.next-version.outputs.next-version }}
|
|
||||||
git push origin ${{ steps.next-version.outputs.next-version }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Trigger CI workflow
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
await github.rest.actions.createWorkflowDispatch({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
workflow_id: 'ci.yml',
|
|
||||||
ref: '${{ steps.next-version.outputs.next-version }}'
|
|
||||||
});
|
|
||||||
Loading…
Reference in a new issue