diff --git a/.github/workflows/release-daily-develop-snapshot.yml b/.github/workflows/release-daily-develop-snapshot.yml new file mode 100644 index 0000000..516a322 --- /dev/null +++ b/.github/workflows/release-daily-develop-snapshot.yml @@ -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 }}" + diff --git a/.github/workflows/release-daily-next-snapshot.yml b/.github/workflows/release-daily-next-snapshot.yml new file mode 100644 index 0000000..059253a --- /dev/null +++ b/.github/workflows/release-daily-next-snapshot.yml @@ -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' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9937aa4..d92a0eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: # schedule: # - cron: '0 0 * * *' inputs: + branch: + description: 'Branch to use' + type: string + default: 'develop' milestone: description: 'Milestone to use as version' type: string @@ -12,6 +16,10 @@ on: workflow_call: inputs: + branch: + description: 'Branch to use' + type: string + default: 'develop' milestone: description: 'Milestone to use as version' type: string @@ -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 }}