-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PCE-2803] add simple release workflow
- Loading branch information
1 parent
15a5774
commit e7f27b8
Showing
4 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.event.head_commit.message, 'Release: ')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
- name: Get app version | ||
id: app_version | ||
run: echo "APP_VERSION=$(./gradlew version --no-daemon --console=plain -q)" >> $GITHUB_OUTPUT | ||
- name: Check release with local version | ||
if: ${{ github.event.head_commit.message != format('Release: {0}', steps.app_version.outputs.APP_VERSION) }} | ||
run: | | ||
echo "Local version doesn't match commit version" | ||
exit 1 | ||
- name: Run test | ||
run: ./gradlew test | ||
- name: Create release in artifactory | ||
env: | ||
REPOSITORY_USERNAME: ${{ secrets.REPOSITORY_USERNAME }} | ||
REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }} | ||
run: | | ||
./gradlew assembleRelease assembleReleaseUnitTest \ | ||
-PrepositoryUserName=${{ env.REPOSITORY_USERNAME }} \ | ||
-PrepositoryPassword=${{ env.REPOSITORY_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,10 +65,6 @@ publishing { | |
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
artifactory { | ||
contextUrl = repositoryPath | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters