Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed release.yml #1861

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
java-version: 11
distribution: temurin

- name: 'Calculate the release version'
run: |
echo "RELEASE_VERSION=${GITHUB_REF#'refs/tags/v'}" >> $GITHUB_ENV
- name: 'Publish a release to Maven Central'
id: publish-sonatype
uses: gradle/gradle-build-action@v2
Expand All @@ -58,13 +62,14 @@ jobs:
with:
gradle-version: wrapper
arguments: |
shadowExecutableJar
publishAllPublicationsToGitHubRepository
- name: 'GitHub Release'
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
release_name: Release ${{ env.RELEASE_VERSION }}
kgevorkyan marked this conversation as resolved.
Show resolved Hide resolved
draft: false
prerelease: false
- name: Upload Diktat CLI to GitHub release
Expand All @@ -74,7 +79,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./diktat-cli/build/diktat-cli-${{ github.ref }}
asset_path: ./diktat-cli/build/diktat-cli-${{ env.RELEASE_VERSION }}
asset_name: diktat
asset_content_type: application/zip
- name: Upload Diktat CLI for Windows to GitHub release
Expand All @@ -94,6 +99,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./diktat-ruleset/build/libs/diktat-${{ github.ref }}.jar
asset_name: diktat-${{ github.ref }}.jar
asset_path: ./diktat-ruleset/build/libs/diktat-${{ env.RELEASE_VERSION }}.jar
asset_name: diktat-${{ env.RELEASE_VERSION }}.jar
asset_content_type: application/zip
Loading