Skip to content

Commit

Permalink
add daily release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
skin27 committed Sep 27, 2024
1 parent acef4a6 commit 9964dd5
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/release-daily-develop-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release Daily Development Snapshot

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
getversion:
runs-on: ubuntu-latest
outputs:
milestone: ${{ steps.gradle-version.outputs.milestone }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: develop

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Get Gradle Project Version
id: maven-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Gradle version: $VERSION"
echo "milestone=$VERSION" >> "$GITHUB_OUTPUT"
printversion:
runs-on: ubuntu-latest
outputs:
milestone: ${{ steps.gradle-version.outputs.milestone }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: develop

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Get Maven Project Version
id: maven-version2
run: |
echo "Maven version: ${{ needs.getversion.outputs.milestone }}"
38 changes: 38 additions & 0 deletions .github/workflows/release-daily-next-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Daily Next Snapshot

on:
workflow_dispatch:
# schedule:
# - cron: '0 2 * * *'

jobs:
getversion:
runs-on: ubuntu-latest
outputs:
milestone: ${{ steps.gradle-version.outputs.milestone }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Get Gradle Project Version
id: gradle-version
run: |
VERSION=$(./gradlew -q printVersion)
echo "Gradle version: $VERSION"
echo "milestone=$VERSION" >> "$GITHUB_OUTPUT"
call-release:
needs: getversion
uses: ./.github/workflows/release.yml
secrets: inherit
with:
branch: 'next'
milestone: ${{needs.getversion.outputs.milestone}}
tag: 'next'
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ on:
# schedule:
# - cron: '0 0 * * *'
inputs:
branch:
description: 'Branch to use'
type: string
default: 'develop'
milestone:
description: 'Milestone to use as version'
type: string
required: true

workflow_call:
inputs:
branch:
description: 'Branch to use'
type: string
default: 'develop'
milestone:
description: 'Milestone to use as version'
type: string
Expand Down Expand Up @@ -60,7 +68,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref_name }}
ref: ${{ inputs.branch }}
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}

Expand Down

0 comments on commit 9964dd5

Please sign in to comment.