Skip to content

Commit becb2cd

Browse files
committed
Spit release workflow into two
1 parent 9f97abd commit becb2cd

File tree

2 files changed

+39
-21
lines changed

2 files changed

+39
-21
lines changed

.github/workflows/release.yml renamed to .github/workflows/release_draft.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
# limitations under the License.
1515
#
1616

17-
name: Release
17+
name: Release - create draft release
1818
on:
1919
workflow_dispatch:
2020
inputs:
2121
tagName:
22-
description: 'Name of git tag to be created, and then released. Must have syntax "v[0-9]+.[0-9]+.[0-9]+".'
22+
description: 'Name of git tag to be created, and then draft release created. Syntax: "v[0-9]+.[0-9]+.[0-9]+".'
2323
required: true
2424

2525
jobs:
@@ -90,22 +90,3 @@ jobs:
9090
body: ${{ steps.generate_release_notes.outputs.releaseNotes }}
9191
draft: true
9292
prerelease: false
93-
94-
publish:
95-
needs: release
96-
runs-on: ubuntu-latest
97-
steps:
98-
- uses: actions/checkout@v4
99-
with:
100-
fetch-depth: 0
101-
ref: refs/tags/${{ github.event.inputs.tagName }}
102-
- uses: olafurpg/setup-scala@v14
103-
with:
104-
java-version: "[email protected]"
105-
- name: Release to Sonatype and Maven Central
106-
run: sbt ci-release
107-
env:
108-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
109-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
110-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
111-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

.github/workflows/release_publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright 2023 ABSA Group Limited
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Release - publish artifacts
18+
on:
19+
release:
20+
types: [released]
21+
22+
jobs:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- uses: olafurpg/setup-scala@v14
29+
with:
30+
java-version: "[email protected]"
31+
- name: Build and release to Sonatype and Maven Central
32+
run: sbt ci-release
33+
env:
34+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
35+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
36+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
37+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 commit comments

Comments
 (0)