Publish artifacts #4
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: Publish artifacts | |
on: | |
# Will only run when release is published. | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
jobs: | |
publish-artifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
ref: hypertrace-1.2.0 | |
fetch-depth: 0 | |
- name: Set up JDK 11 for x64 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
architecture: x64 | |
cache: maven | |
- name: Build with Maven | |
run: mvn install package -DskipTests -Drat.ignoreErrors=true -Pbin-dist -Pbuild-shaded-jar -Djdk.version=11 -T1C | |
- name: Determine version | |
id: version | |
run: | | |
LAST_TAG=$(git describe --abbrev=0 --tags) | |
if [ "$LAST_TAG" = $(git describe --tag) ]; then | |
version="$LAST_TAG" | |
else | |
version="${LAST_TAG}-SNAPSHOT" | |
fi | |
echo "$version" | |
echo version="$version" >> $GITHUB_OUTPUT | |
- name: Collect shaded jars | |
run: | | |
echo ${{ steps.version.outputs.version }} | |
find . -name '*.jar' | |
mkdir pinot-${{ steps.version.outputs.version }} | |
cp build/*.jar pinot-${{ steps.version.outputs.version }} || true | |
cp pinot-distribution/target/*.jar pinot-${{ steps.version.outputs.version }} || true | |
cp -r ./pinot-distribution/target/apache-pinot-1.2.0-bin/apache-pinot-1.2.0-bin/* pinot-${{ steps.version.outputs.version }} || true | |
- name: Upload Packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: pinot-${{ steps.version.outputs.version }} |