Skip to content

Commit

Permalink
fix: Fix deprecated set-env and update java version. (#104)
Browse files Browse the repository at this point in the history
- Update set-env way to setting environment variables.
- Update java to version 8 distribution temurin
- Add a additional asset kafka-connect-mq-source-VERSION.jar

Signed-off-by: Joel Hanson <[email protected]>
  • Loading branch information
Joel-hanson authored Mar 11, 2023
1 parent 41c8cde commit 7cc087c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/github-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 8
distribution: 'temurin'
- name: Get java-version
run: |
BUILD_VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )
echo "::set-env name=VERSION::$BUILD_VERSION"
echo "VERSION=$BUILD_VERSION" >> $GITHUB_ENV
- name: Build
run: mvn package
- name: Create Release
Expand All @@ -33,8 +34,8 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
- name: Upload Release Asset With Dependencies
id: upload-release-asset-with-dependencies
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -43,3 +44,13 @@ jobs:
asset_path: ./target/kafka-connect-mq-source-${{env.VERSION}}-jar-with-dependencies.jar
asset_name: kafka-connect-mq-source-${{env.VERSION}}-jar-with-dependencies.jar
asset_content_type: application/java-archive
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/kafka-connect-mq-source-${{env.VERSION}}.jar
asset_name: kafka-connect-mq-source-${{env.VERSION}}.jar
asset_content_type: application/java-archive

0 comments on commit 7cc087c

Please sign in to comment.