Add token based signing support to pom #25
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: Build and Sign Tableau Connector | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "test/**" | |
- "**.md" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "test/**" | |
- "**.md" | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag for the release' | |
required: true | |
default: 'v1.0.0' | |
jobs: | |
build_and_sign: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven | |
run: mvn clean package | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tableau-connector | |
path: target/*.taco | |
release: | |
needs: build_and_sign | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: tableau-connector | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_id }} | |
release_name: Release ${{ github.run_id }} | |
draft: false | |
prerelease: false | |
- name: 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: ./ai.startree.pinot-1.0.taco | |
asset_name: ai.startree.pinot-1.0.taco | |
asset_content_type: application/octet-stream |