-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 865 Bytes
/
Copy pathrelease.yml
File metadata and controls
37 lines (33 loc) · 865 Bytes
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
35
36
37
name: Build Release
# Trigger on manual release creation or tag push
on:
release:
types: [published]
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
# Extract version from tag
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.tag_name }}
steps:
- name: Extract version from tag
id: version
run: |
TAG=${GITHUB_REF#refs/tags/}
VERSION=${TAG#v}
echo "tag_name=$TAG" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
# Trigger build workflow
trigger-build:
needs: prepare
uses: ./.github/workflows/build-release.yml
with:
version: ${{ needs.prepare.outputs.version }}
tag_name: ${{ needs.prepare.outputs.tag_name }}
secrets: inherit