adding tools v2 #46
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: Java CI Cresco AIAPI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: 'SONATYPE CRED' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: mvn package bundle:bundle | |
- uses: dev-drprasad/[email protected] # PRERELEASE is v1.0 and can also be used to test and give us feedback | |
with: | |
tag_name: '1.1-SNAPSHOT' # tag name to delete | |
github_token: ${{ secrets.GITHUB_TOKEN }} # (required) a GitHub token with write access to the repo that needs to be modified | |
- name: Create Draft Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: '1.1-SNAPSHOT' | |
release_name: 'Cresco AI API' | |
draft: true | |
prerelease: false | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: target/aiapi-1.1-SNAPSHOT.jar | |
asset_name: aiapi-1.1-SNAPSHOT.jar | |
asset_content_type: application/jar | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} |