Skip to content

Commit e71aba0

Browse files
authored
Split and Reuse the Release workflow (#333)
1 parent d93494f commit e71aba0

File tree

4 files changed

+50
-95
lines changed

4 files changed

+50
-95
lines changed

.github/workflows/pre-release.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: true
1111

12-
defaults:
13-
run:
14-
shell: bash
15-
1612
jobs:
17-
release:
18-
runs-on: ubuntu-latest
19-
name: pre release
20-
21-
steps:
22-
- uses: radcortez/project-metadata-action@master
23-
name: retrieve project metadata
24-
id: metadata
25-
with:
26-
github-token: ${{secrets.GITHUB_TOKEN}}
27-
metadata-file-path: '.github/project.yml'
28-
29-
- name: Validate version
30-
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
31-
run: |
32-
echo '::error::Cannot release a SNAPSHOT version.'
33-
exit 1
13+
pre-release:
14+
name: Pre-Release
15+
uses: quarkiverse/.github/.github/workflows/pre-release.yml@main
16+
secrets: inherit

.github/workflows/release-perform.yml

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

.github/workflows/release-prepare.yml

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 & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)