Skip to content

Commit adb9b25

Browse files
akscjoAmit Chauhan
andauthored
Added the github action to create and upload release (#26)
Co-authored-by: Amit Chauhan <[email protected]>
1 parent 31d6676 commit adb9b25

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
name: Java CI Create and Upload Release
1+
name: Java CI to create and upload release on pull request
22
on:
33
push:
4-
tags:
5-
- "v*"
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
8+
env:
9+
build-number: ${GITHUB_RUN_NUMBER}
610

711
jobs:
812
build:
@@ -15,16 +19,16 @@ jobs:
1519
distribution: 'temurin'
1620
cache: 'maven'
1721
- run: mvn clean package -DskipTests
18-
- run: mkdir staging && cp target/*.jar staging
22+
- run: mkdir staging && mv target/yb-workload-sim.jar target/yb-workload-sim-${{ env.build-number }}.jar && cp target/*.jar staging
1923
- uses: actions/upload-artifact@v3
2024
with:
2125
name: Package
2226
path: staging
2327
retention-days: 1
24-
- uses: "marvinpinto/action-automatic-releases@latest"
28+
- uses: marvinpinto/action-automatic-releases@latest
2529
with:
2630
repo_token: "${{ secrets.ACTEST }}"
27-
# automatic_release_tag: "latest"
31+
automatic_release_tag: "${{ github.run_number }}"
32+
title: "Automated Build ${{ github.run_number }}"
2833
prerelease: true
29-
title: "Development Build"
3034
files: staging/*.jar

0 commit comments

Comments
 (0)