add command to get current version #17
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
name: release-downloader | |
on: | |
push: | |
branches: | |
- "master" | |
- "backwards-compatibility" | |
pull_request: | |
branches: | |
- "master" | |
jobs: | |
check-directory: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'corretto' | |
- run: mvn -B package --file pom.xml -DskipITs | |
- run: echo "MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV | |
- run: gh release download -R awslabs/amazon-kinesis-client --archive=tar.gz --output tmp/kinesis-client.tar.gz | |
- run: ls tmp | |
- run: tar -xzf tmp/kinesis-client.tar.gz | |
- run: echo "LATEST_RELEASE=$(ls | grep amazon-kinesis-client | sed 's/.*-//')" >> $GITHUB_ENV | |
- run: curl https://repo1.maven.org/maven2/software/amazon/kinesis/amazon-kinesis-client/$LATEST_RELEASE/amazon-kinesis-client-$LATEST_RELEASE.jar --output amazon-kinesis-client-$LATEST_RELEASE.jar | |
- run: ls ~/.m2/repository/software/amazon/kinesis/amazon-kinesis-client/$MVN_VERSION | |
- run: ls ~/.m2/repository/software/amazon/kinesis/amazon-kinesis-client/$LATEST_RELEASE | |
- run: rm -rf tmp | |