Merge pull request #204 from CAST-Extend/IMAGKSL-1279_Tools_does-not-… #61
Workflow file for this run
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
# Creates a Github Release with the required assets once a tag is pushed to the repository | |
# Trigger when there is a semver tag pushed to master branch | |
name: Create Github Draft Release | |
on: | |
push: | |
tags: | |
- '*' | |
# Job steps : | |
# * Checkout the tag | |
# * Get JDK 8 | |
# * Get the maven repo cache | |
# * Run maven build | |
# * Create a Github Release with the tag for the release name (as a draft to add some details) | |
# * Upload the jenkins hpi file and the jar file (needs to be 2 separate actions) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout tag | |
uses: actions/checkout@v1 | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Maven Build | |
run: mvn -B package --file pom.xml | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
- name: Upload Jenkins Plugin | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./aip-console-jenkins/target/aip-console-jenkins.hpi | |
asset_name: aip-console-jenkins.hpi | |
asset_content_type: application/zip | |
- name: Upload AIP Console Tools CLI | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./aip-console-tools-cli/target/aip-console-tools-cli.jar | |
asset_name: aip-console-tools-cli.jar | |
asset_content_type: application/java-archive |