Only create tags (not releases) when merging PRs into master (#7462)
* Create a tag instead of a release * Rename script to 'tags' (not 'release')
This commit is contained in:
parent
8778a305f4
commit
996fb5c21b
1 changed files with 13 additions and 14 deletions
|
|
@ -8,8 +8,8 @@ on:
|
||||||
- release/**
|
- release/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-tag:
|
||||||
if: ${{ vars.CREATE_RELEASE }}
|
if: ${{ vars.CREATE_TAGS }}
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
@ -35,16 +35,15 @@ jobs:
|
||||||
current-version: ${{ env.CURRENT_VERSION }}
|
current-version: ${{ env.CURRENT_VERSION }}
|
||||||
override-stage: ${{ env.OVERRIDE_STAGE }}
|
override-stage: ${{ env.OVERRIDE_STAGE }}
|
||||||
|
|
||||||
- name: Print next version
|
- name: Create git tag
|
||||||
run: echo ${{ steps.next-version.outputs.next-version }}
|
uses: actions/github-script@v7
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.next-version.outputs.next-version }}
|
script: |
|
||||||
release_name: ${{ steps.next-version.outputs.next-version }}
|
const ref = `refs/tags/${{ steps.next-version.outputs.next-version }}`;
|
||||||
draft: false
|
const sha = context.sha;
|
||||||
prerelease: ${{ !startsWith(github.ref, 'refs/heads/release') }}
|
await github.git.createRef({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
ref: ref,
|
||||||
|
sha: sha,
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue