-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automatic creation of release assets
- Loading branch information
1 parent
bb85379
commit e6c2c5a
Showing
2 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Maven build | ||
name: "Maven test build" | ||
on: [ push, pull_request ] | ||
jobs: | ||
test: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# from https://github.com/actions/upload-release-asset | ||
name: "Make a release" | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
publish: | ||
name: "Build and upload release assets" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v2 | ||
- name: "Set up JDK" | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: "Cache" | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: "Compile and package" | ||
run: mvn -B clean install | ||
- 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 asset perun-rpc.war" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: perun-rpc/target/perun-rpc.war | ||
asset_name: perun-rpc.war | ||
asset_content_type: application/x-webarchive | ||
- name: "Upload asset perun-engine.jar" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: perun-engine/target/perun-engine.jar | ||
asset_name: perun-engine.jar | ||
asset_content_type: application/java-archive | ||
- name: "Upload asset perun-ldapc.jar" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: perun-ldapc/target/perun-ldapc.jar | ||
asset_name: perun-ldapc.jar | ||
asset_content_type: application/java-archive | ||
- name: "Upload asset perun-web-gui.war" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: perun-web-gui/target/perun-web-gui.war | ||
asset_name: perun-web-gui.war | ||
asset_content_type: application/x-webarchive | ||
- name: "Upload asset perun-cli-java.jar" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: perun-cli-java/target/perun-cli-java.jar | ||
asset_name: perun-cli-java.jar | ||
asset_content_type: application/java-archive |