-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 938 Bytes
/
release.yaml
File metadata and controls
35 lines (30 loc) · 938 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
name: Release
on:
pull_request: {}
release:
types:
- published
jobs:
version:
name: Setup version
if: (github.actor != 'dependabot[bot]' && github.actor != 'codereaper-automation[bot]') || github.event_name != 'release'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.real.outputs.version || steps.fake.outputs.version }}
steps:
- uses: actions/checkout@v6
- name: Output real version
if: github.event_name == 'release'
id: real
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Output faked version
if: github.event_name == 'pull_request'
id: fake
run: echo "version=0.0.0" >> $GITHUB_OUTPUT
release:
name: Build release
needs: version
uses: ./.github/workflows/build-release.yaml
with:
version: ${{ needs.version.outputs.version }}
event_name: ${{ github.event_name }}