From 610ce1642e25afef16f742a7b405af29cf19b262 Mon Sep 17 00:00:00 2001 From: Chris Aslanoglou Date: Thu, 14 Sep 2023 01:07:25 +0300 Subject: [PATCH] chore(release): create GH release [no-jira] --- .github/workflows/release.yml | 64 ++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65bb166..501c12a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Release on: push: - tags: - - '*' +# tags: +# - '*' jobs: release-core: runs-on: ubuntu-latest @@ -11,23 +11,23 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.ref }} - - name: Issue a release only if a tag is based on a merged commit in `main` branch - run: | - tag_commit=$(git rev-parse ${{ github.ref }}) - merged_commit=$(git rev-parse main) - - if git merge-base --is-ancestor $tag_commit $merged_commit; then - echo "Tag is based on a merged commit in the main branch" - else - echo "Tag is not based on a merged commit in the main branch. Exiting." - exit 0 - fi - - name: Check tag name pattern follows `vX.Y.Z` - run: | - if [[ ! "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Tag name does not match the pattern 'vX.Y.Z'. Exiting." - exit 0 - fi +# - name: Issue a release only if a tag is based on a merged commit in `main` branch +# run: | +# tag_commit=$(git rev-parse ${{ github.ref }}) +# merged_commit=$(git rev-parse main) +# +# if git merge-base --is-ancestor $tag_commit $merged_commit; then +# echo "Tag is based on a merged commit in the main branch" +# else +# echo "Tag is not based on a merged commit in the main branch. Exiting." +# exit 0 +# fi +# - name: Check tag name pattern follows `vX.Y.Z` +# run: | +# if [[ ! "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then +# echo "Tag name does not match the pattern 'vX.Y.Z'. Exiting." +# exit 0 +# fi - name: Setup Java uses: actions/setup-java@v3 with: @@ -35,13 +35,21 @@ jobs: distribution: 'zulu' - name: Build and test run: ./gradlew core:build - - name: Publish package - uses: gradle/gradle-build-action@v2.4.2 - env: - # https://docs.gradle.org/current/userguide/signing_plugin.html#sec:in-memory-keys - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} - ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} +# - name: Publish package +# uses: gradle/gradle-build-action@v2.4.2 +# env: +# # https://docs.gradle.org/current/userguide/signing_plugin.html#sec:in-memory-keys +# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} +# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} +# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} +# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} +# with: +# arguments: core:publishAllPublicationsToMavenCentral --no-configuration-cache + + - name: Create GitHub release + uses: softprops/action-gh-release@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - arguments: core:publishAllPublicationsToMavenCentral --no-configuration-cache + name: ${{ github.ref }} + generate_release_notes: true