blob: 6cf7f72fe7170489bb90331e46b2f542c7bf9caa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
name: Create Release
on:
push:
paths:
- 'VERSION.txt'
jobs:
check-release:
runs-on: [linux, x64, zen]
timeout-minutes: 2
outputs:
already_released: ${{ steps.check_tag.outputs.exists }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if release tag already exists
id: check_tag
run: |
VERSION=$(cat VERSION.txt | tr -d '[:space:]')
if git tag -l "v$VERSION" | grep -q .; then
echo "Tag v$VERSION already exists, skipping release"
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "Tag v$VERSION does not exist, proceeding with release"
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
release:
needs: [check-release]
if: needs.check-release.outputs.already_released != 'true'
uses: ./.github/workflows/create_release_impl.yml
secrets: inherit
|