Added snapshot file changes #5
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: Cassandra Deployment | |
on: | |
push: | |
branches: | |
- juspay-4.2 | |
- cassandra-4.1 | |
- feature/cassandra-4-1-5 | |
- feature/with-snapshot-changes | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: benjlevesque/short-sha@v2.1 | |
id: short-sha | |
with: | |
length: 7 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Build with Ant | |
run: ant -noinput -buildfile build.xml jar -Duse.jdk11=true -Drat.skip=true | |
- name: Copy files | |
run: | | |
mkdir -p apache-cassandra/cassandra | |
mkdir -p apache-cassandra/cassandra/tools | |
mkdir -p apache-cassandra/cassandra/lib | |
cp -R bin apache-cassandra/cassandra | |
cp -R tools/bin apache-cassandra/cassandra/tools | |
cp -R tools/cqlstress-counter-example.yaml apache-cassandra/cassandra/tools | |
cp -R tools/cqlstress-example.yaml apache-cassandra/cassandra/tools | |
cp -R tools/cqlstress-insanity-example.yaml apache-cassandra/cassandra/tools | |
cp -R tools/cqlstress-lwt-example.yaml apache-cassandra/cassandra/tools | |
cp -R build/tools/lib apache-cassandra/cassandra/tools | |
cp -R pylib apache-cassandra/cassandra | |
cp -R conf apache-cassandra/cassandra | |
cp -R doc apache-cassandra/cassandra | |
cp -R lib/sigar-bin apache-cassandra/cassandra/lib | |
cp -R build/lib/jars/. apache-cassandra/cassandra/lib | |
cp -R NEWS.txt apache-cassandra/cassandra | |
cp -R NOTICE.txt apache-cassandra/cassandra | |
cp -R CHANGES.txt apache-cassandra/cassandra | |
cp -R LICENSE.txt apache-cassandra/cassandra | |
cp -R build/apache-cassandra-*.jar apache-cassandra/cassandra/lib | |
- name: Compress | |
uses: a7ul/tar-action@v1.1.0 | |
id: compress | |
with: | |
command: c | |
cwd: apache-cassandra | |
files: ./ | |
outPath: apache-cassandra-release-${{steps.short-sha.outputs.sha}}.tar.gz | |
- name: release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: Release apache-cassandra-${{ steps.short-sha.outputs.sha }} | |
tag_name: apache-cassandra-${{ steps.short-sha.outputs.sha }} | |
body_path: CONTRIBUTING.md | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: upload artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./apache-cassandra-release-${{ steps.short-sha.outputs.sha }}.tar.gz | |
asset_name: apache-cassandra-release-${{ steps.short-sha.outputs.sha }}.tar.gz | |
asset_content_type: application/gzip |