Skip to content

⬆️ CI/CD: Updated #30

⬆️ CI/CD: Updated

⬆️ CI/CD: Updated #30

name: Release
on:
push:
branches:
- 'release/**'
permissions:
contents: write
env:
TAG: ${{ github.ref_name }}
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create tag
run: |
echo ${TAG}
echo ${TAG##*/}
OUTPUT="$(git ls-remote --tags origin | grep ${TAG##*/})"
echo "${OUTPUT:0-1}"
if [[ -n "$OUTPUT" ]]; then
echo "${TAG}-rc-`expr "${OUTPUT:0-1}" + 1`"
else
echo "${TAG}-rc-1"
fi
shell: bash
# - name: Create release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# echo ${TAG##*/}
# gh release create ${TAG##*/} \
# --repo="$GITHUB_REPOSITORY" \
# --title="${TAG##*/}rc" \
# --generate-notes