Skip to content

1.0.0

1.0.0 #4

Workflow file for this run

# Copyright 2024 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Release - publish artifacts
on:
release:
types: [released]
jobs:
publish-jar-file:
name: Publish jar file to GitHub Release
runs-on: ubuntu-latest
defaults:
run:
working-directory: bigfiles
strategy:
matrix:
include:
- scala: 2.12.17
scalaShort: "2.12"
- scala: 2.11.12
scalaShort: "2.11"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: coursier/cache-action@v6
- name: Setup Scala
uses: olafurpg/setup-scala@v14
with:
java-version: "[email protected]"
- name: Build jar for Scala ${{ matrix.scala }}
run: sbt ++${{ matrix.scala }} assembly
- name: Create staging directory
run: mkdir -p staging
- name: Copy jar to staging
run: |
jar_file=$(ls target/scala-${{ matrix.scalaShort }}/dataset-comparison-*.jar)
base_name=$(basename $jar_file)
cp target/scala-${{ matrix.scalaShort }}/dataset-comparison-*.jar staging/scala-${{ matrix.scalaShort }}$base_name
echo "artifact_name=scala-${{ matrix.scalaShort }}-$base_name" >> $GITHUB_ENV
ls staging
- name: Info on publish
run: |
echo "Release: ${{ github.event.release.tag_name }}"
echo "Published file: ${{ env.artifact_name }}"
echo "In repo: ${{ github.repository }}"
- name: Upload JAR file to GitHub Release
run: gh release upload ${{ github.event.release.tag_name }} staging/* --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}