Skip to content

Commit be4dbec

Browse files
authored
Split and Reuse the Release workflow (#821)
1 parent 6a148ec commit be4dbec

File tree

4 files changed

+54
-87
lines changed

4 files changed

+54
-87
lines changed

.github/workflows/pre-release.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@ on:
55
paths:
66
- '.github/project.yml'
77

8-
jobs:
9-
release:
10-
runs-on: ubuntu-latest
11-
name: pre release
12-
13-
steps:
14-
- uses: radcortez/project-metadata-action@master
15-
name: retrieve project metadata
16-
id: metadata
17-
with:
18-
github-token: ${{secrets.GITHUB_TOKEN}}
19-
metadata-file-path: '.github/project.yml'
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
2011

21-
- name: Validate version
22-
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
23-
run: |
24-
echo '::error::Cannot release a SNAPSHOT version.'
25-
exit 1
12+
jobs:
13+
pre-release:
14+
name: Pre-Release
15+
uses: quarkiverse/.github/.github/workflows/pre-release.yml@main
16+
secrets: inherit
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Quarkiverse Prepare Release
2+
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
paths:
7+
- '.github/project.yml'
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
prepare-release:
15+
name: Prepare Release
16+
if: ${{ github.event.pull_request.merged == true}}
17+
uses: quarkiverse/.github/.github/workflows/prepare-release.yml@main
18+
secrets: inherit
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Quarkiverse Perform Release
2+
run-name: Perform ${{github.event.inputs.tag || github.ref_name}} Release
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag to release'
11+
required: true
12+
13+
permissions:
14+
attestations: write
15+
id-token: write
16+
contents: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
perform-release:
24+
name: Perform Release
25+
uses: quarkiverse/.github/.github/workflows/perform-release.yml@main
26+
secrets: inherit
27+
with:
28+
version: ${{github.event.inputs.tag || github.ref_name}}

.github/workflows/release.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)