Skip to content

Commit 044f3fa

Browse files
committed
build: add nightly job for single repository
1 parent 0b52e7b commit 044f3fa

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Nightly
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
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.
8+
required: false
9+
type: string
10+
11+
jobs:
12+
13+
Publish-Artefacts:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- id: get-version
18+
run: |
19+
if [ -z ${{ inputs.version }} ]; then
20+
echo "VERSION=$(IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<$(grep "version" gradle.properties | awk -F= '{print $2}') && echo $RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-$(date +"%Y%m%d")-SNAPSHOT)" >> "$GITHUB_OUTPUT"
21+
else
22+
echo "VERSION=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
23+
fi
24+
- uses: eclipse-edc/.github/.github/actions/set-project-version@main
25+
with:
26+
version: ${{ steps.get-version.outputs.VERSION }}
27+
- uses: eclipse-edc/.github/.github/actions/publish-maven-artifacts@main
28+
with:
29+
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
30+
gpg-passphrase: ${{ secrets.ORG_GPG_PASSPHRASE }}
31+
username: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
32+
password: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}
33+
- uses: sarisia/actions-status-discord@v1
34+
if: always()
35+
with:
36+
webhook: ${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}
37+
title: "Nightly ${{ github.repository }} build"
38+
description: "Build and publish ${{ steps.get-version.outputs.VERSION }}"
39+
username: GitHub Actions
40+
41+
Dependency-Review:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: eclipse-edc/.github/.github/actions/request-dependencies-review@main
46+
with:
47+
gitlab-token: ${{ secrets.GITLAB_API_TOKEN }}

0 commit comments

Comments
 (0)