Skip to content
name: Create auto release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
auto_release:
name: Auto release
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Check if release already exists
run: |
RELEASE_EXISTS=$(git ls-remote --exit-code --tags origin "${{ github.ref_name }}" | wc -l)
echo "RELEASE_EXISTS=$RELEASE_EXISTS" >> $GITHUB_ENV
- name: Create Release
id: create_release
if: env.RELEASE_EXISTS == '0'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Version ${{ github.ref_name }}
body: Version ${{ github.ref_name }}
draft: false
prerelease: false