Skip to content

Commit e1b1677

Browse files
committed
build: add prepare and release workflows
1 parent 23251c1 commit e1b1677

File tree

6 files changed

+35
-136
lines changed

6 files changed

+35
-136
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Prepare Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: the version to be released. If it ends with '.0' a proper release is created, bugfix otherwise
8+
required: true
9+
type: string
10+
11+
jobs:
12+
Prepare-Release:
13+
uses: eclipse-edc/.github/.github/workflows/technology-prepare-release.yml@main
14+
secrets: inherit
15+
with:
16+
version: ${{ inputs.version }}

.github/workflows/publish.yaml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: Semantic Version string to use for this nightly build
7+
description: Semantic Version string to use for this nightly build. It should ends with `-SNAPSHOT`. If not, please take a look at the release workflow.
88
required: false
99
schedule:
1010
- cron: "0 3 * * *" # run at 03:00 UTC
@@ -58,50 +58,14 @@ jobs:
5858
needs: [ Secrets-Presence, Run-Tests, Determine-Version ]
5959
if: |
6060
needs.Secrets-Presence.outputs.HAS_OSSRH
61-
6261
steps:
63-
- uses: actions/checkout@v4
64-
- uses: eclipse-edc/.github/.github/actions/setup-build@main
65-
66-
# Import GPG Key
67-
- uses: eclipse-edc/.github/.github/actions/import-gpg-key@main
68-
if: |
69-
needs.Secrets-Presence.outputs.HAS_OSSRH
70-
name: "Import GPG Key"
62+
- uses: eclipse-edc/.github/.github/actions/publish-maven-artifacts@main
7163
with:
64+
version: ${{ needs.Determine-Version.outputs.VERSION }}
7265
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
73-
74-
- name: Set correct version
75-
env:
76-
VERSION: ${{ needs.Determine-Version.outputs.VERSION }}
77-
run: |
78-
existingVersion=$(grep "version" gradle.properties | awk -F= '{print $2}')
79-
grep -rlz "$existingVersion" . --exclude=\*.{sh,bin} | xargs sed -i "s/$existingVersion/$VERSION/g"
80-
81-
- name: "Publish To OSSRH/MavenCentral"
82-
if: |
83-
needs.Secrets-Presence.outputs.HAS_OSSRH
84-
env:
85-
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
86-
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
87-
VERSION: ${{ needs.Determine-Version.outputs.VERSION }}
88-
run: |-
89-
cmd=""
90-
if [[ $VERSION != *-SNAPSHOT ]]
91-
then
92-
cmd="closeAndReleaseSonatypeStagingRepository";
93-
fi
94-
echo "Publishing Version $VERSION to Sonatype"
95-
./gradlew publishToSonatype ${cmd} --no-parallel -Pversion=$VERSION -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}"
96-
97-
98-
# If we have a release version, also invoke the GH release job, bump versions, etc.
99-
Create-GitHub-Release:
100-
needs: [ Publish-Artefacts, Determine-Version ]
101-
if: ${{ !endsWith(needs.Determine-Version.outputs.VERSION, '-SNAPSHOT') }}
102-
uses: ./.github/workflows/release-tech-az.yml
103-
with:
104-
edc_version: ${{ needs.Determine-Version.outputs.VERSION }}
66+
gpg-passphrase: ${{ secrets.ORG_GPG_PASSPHRASE }}
67+
osshr-username: ${{ secrets.ORG_OSSRH_USERNAME }}
68+
osshr-password: ${{ secrets.ORG_OSSRH_PASSWORD }}
10569

10670
Post-To-Discord:
10771
needs: [ Publish-Artefacts, Determine-Version, Secrets-Presence ]
@@ -116,4 +80,4 @@ jobs:
11680
status: ${{ needs.Publish-Components.result == 'skipped' && 'Failure' || needs.Publish-Artefacts.result }}
11781
title: "Release Build Technology AZURE"
11882
description: "Build and publish ${{ needs.Determine-Version.outputs.VERSION }}"
119-
username: GitHub Actions
83+
username: GitHub Actions

.github/workflows/release-tech-az.yml

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

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
7+
jobs:
8+
Release:
9+
uses: eclipse-edc/.github/.github/workflows/technology-release.yml@main
10+
secrets: inherit

build.gradle.kts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,17 @@ plugins {
1818

1919
val techAzScmUrl: String by project
2020
val techAzScmConnection: String by project
21-
val annotationProcessorVersion: String by project
2221

2322
buildscript {
2423
dependencies {
25-
val edcGradlePluginsVersion: String by project
26-
classpath("org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin:${edcGradlePluginsVersion}")
24+
val version: String by project
25+
classpath("org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin:${version}")
2726
}
2827
}
2928

3029
allprojects {
3130
apply(plugin = "org.eclipse.edc.edc-build")
3231

33-
// configure which version of the annotation processor to use. defaults to the same version as the plugin
34-
configure<org.eclipse.edc.plugins.autodoc.AutodocExtension> {
35-
processorVersion.set(annotationProcessorVersion)
36-
outputDirectory.set(project.layout.buildDirectory.asFile.get())
37-
}
38-
3932
configure<org.eclipse.edc.plugins.edcbuild.extensions.BuildExtension> {
4033
pom {
4134
scmUrl.set(techAzScmConnection)

gradle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
group=org.eclipse.edc.azure
22
version=0.7.1
3-
# configure the build:
4-
annotationProcessorVersion=0.7.1
5-
edcGradlePluginsVersion=0.7.1
63
# used for publishing artifacts and plugins
74
techAzScmConnection=scm:git:[email protected]:eclipse-edc/Technology-Azure.git
85
techAzScmUrl=https://github.com/eclipse-edc/Technology-Azure.git

0 commit comments

Comments
 (0)