This is an automated email from the ASF dual-hosted git repository. mibo pushed a commit to branch OLINGO-1636-jdk_upgrade in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git
commit 54be5cab01a7972deefa69c52553dd6c47bd0ba9 Author: Iliyan Velichkov <[email protected]> AuthorDate: Wed Dec 13 10:49:50 2023 +0200 add release workflow Signed-off-by: Iliyan Velichkov <[email protected]> --- .github/workflows/release.yml | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..0c674b8f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,87 @@ +name: Release + +on: + workflow_dispatch: + inputs: + releaseVersion: + description: Release Version + required: true + default: 3.0.0 + snapshotVersion: + description: Snapshot Version + required: true + default: 3.0.1-SNAPSHOT + +run-name: 'version set to ${{ github.event.inputs.releaseVersion }} for release' + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + + - name: Set up JDK Corretto 8 + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: '8' + architecture: x64 + + - name: "Configure Git" + run: | + git fetch + git checkout ${{ github.event.inputs.branch }} + git config user.name "$GITHUB_ACTOR" + git config user.email "[email protected]" + + - name: "Maven: Set Release Version" + run: mvn versions:set -DnewVersion=${{ github.event.inputs.releaseVersion }} + + - name: Build Project + run: mvn clean install + + - name: "Git: Commit Release Version" + run: | + git add '**pom.xml' + git commit -m "version set to ${{ github.event.inputs.releaseVersion }} for release" + + - name: "Maven: Set Snapshot Version" + run: mvn versions:set -DnewVersion=${{ github.event.inputs.snapshotVersion }} + + - name: "Git: Commit Snapshot Version" + run: | + git add '**pom.xml' + git commit -m "version set to ${{ github.event.inputs.snapshotVersion }} for development" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release + - First Change + - Second Change + draft: false + prerelease: false + + - name: "Git: Push Changes" + run: | + git checkout -B ${{ github.event.inputs.releaseVersion }} + git push --set-upstream origin ${{ github.event.inputs.releaseVersion }} + git checkout -B master + git push --set-upstream origin master \ No newline at end of file
