diff --git a/.github/workflows/create_github_release.yml b/.github/workflows/create_github_release.yml index 941921c..46c2dfc 100644 --- a/.github/workflows/create_github_release.yml +++ b/.github/workflows/create_github_release.yml @@ -3,35 +3,25 @@ on: push permissions: contents: write jobs: - build: + check_version: name: Create Github Release runs-on: ubuntu-latest outputs: - myOutput: ${{ steps.step1.outputs.myOutput }} + versionName: ${{ steps.readVersion.outputs.VERSION_NAME }} steps: - name: Checkout code uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - name: Read file and store value in variable + id: readVersion run: | MY_VERSION=$(grep '^versionName' gradle.properties | cut -d'=' -f2) echo "Version name from gradle.properties: $MY_VERSION" - echo "##[set-output name=versionName]$MY_VERSION" + echo "VERSION_NAME=$MY_VERSION" >> "$GITHUB_OUTPUT" shell: bash - - name: Step 1 - id: step1 - run: echo "::set-output name=myOutput::1.0.4" - # - uses: ncipollo/release-action@v1 - # with: - # tag: ${{ steps.build.outputs.versionName }} - # replacesArtifacts: true - # artifacts: build/libs/detekt-rules.jar - job2: - needs: build + generate_release: + name: Generate Github release + needs: check_version runs-on: ubuntu-latest steps: - name: Checkout code @@ -49,14 +39,14 @@ jobs: - name: Setup gpg private key run: | echo "${{secrets.GPG_PRIVATE_KEY}}" > maven-secret-key.asc - - name: Step 2 - run: echo "Output from Job 1 ${{ needs.build.outputs.myOutput }}" - name: Generate jar run: | ./gradlew jar - echo $versionName + echo ${{ needs.check_version.outputs.versionName }} - uses: ncipollo/release-action@v1 with: - tag: ${{ needs.build.outputs.myOutput }} + tag: ${{ needs.check_version.outputs.versionName }} replacesArtifacts: true - artifacts: build/libs/detekt-rules.jar \ No newline at end of file + artifacts: build/libs/detekt-rules.jar + skipIfReleaseExists: true + generateReleaseNotes: true \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 31db391..1111257 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,6 @@ allprojects { apply(plugin = "signing") val dokkaHtml by tasks.existing(DokkaTask::class) - val dokkaJar by tasks.creating(org.gradle.jvm.tasks.Jar::class) { group = JavaBasePlugin.DOCUMENTATION_GROUP archiveClassifier.set("javadoc")