Files
cellar/.github/workflows/release.yml
Julien Lengrand-Lambert 0c6393e9e1 Updates deliverable
* Removes dummy greeting provider
* Moves linux scripts to specific folder
* Add scripts to main release delivery
2020-11-16 22:05:29 +01:00

50 lines
1.9 KiB
YAML

name: Java CI Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: maven-settings
uses: whelk-io/maven-settings-xml-action@v10
with:
servers: '[{"id": "github", "username": "jlengrand", "password": "${{ secrets.GITHUB_TOKEN }}"}]'
repositories: '[{ "id": "central2", "url": "https://repo1.maven.org/maven2" }, { "id": "github", "url": "https://maven.pkg.github.com/jlengrand/cellar-driver" }]'
- name: Build with Maven
run: |
mvn -B package;
mkdir cellar-dist; cp -r cellar-app/target/libs cellar-dist; cp cellar-app/target/cellar-app.jar cellar-dist; cp scripts/cellar* cellar-dist
zip -r cellar.zip cellar-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: cellar.zip
asset_name: cellar.zip
asset_content_type: application/zip