-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pushing package and build information
- Loading branch information
1 parent
5db2a8c
commit 4937cc2
Showing
1 changed file
with
50 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 |
---|---|---|
|
@@ -9,11 +9,60 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: install Octopus Deploy CLI | ||
uses: OctopusDeploy/install-octocli@v1 | ||
with: | ||
version: 7.4.2 | ||
|
||
- name: Update version | ||
run: mvn versions:set -DnewVersion=0.1.${{ github.run_number }} | ||
|
||
- name: List dependencies | ||
run: mvn dependency:tree | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
run: mvn -B package --file pom.xml -DfinalName=app | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: 0.1.${{ github.run_number }} | ||
release_name: Release 0.1.${{ github.run_number }} | ||
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 }} | ||
asset_path: app.jar | ||
asset_name: target/app.jar | ||
asset_content_type: application/zip | ||
|
||
- name: Rename package | ||
run: mv target/app.jar target/app.0.1.${{ github.run_number }}.jar | ||
|
||
- name: Push Package | ||
run: octo push --space=${{ secrets.OCTOPUS_SERVER_SPACE}} --server=${{ secrets.OCTOPUS_SERVER_URL }} --apiKey=${{ secrets.OCTOPUS_API_KEY }} target/app.0.1.${{ github.run_number }}.jar | ||
|
||
- name: Generate Octopus Deploy build information | ||
uses: xo-energy/[email protected] | ||
with: | ||
octopus_api_key: ${{ secrets.OCTOPUS_API_KEY }} | ||
octopus_server: ${{ secrets.OCTOPUS_SERVER_URL }} | ||
octopus_space: ${{ secrets.OCTOPUS_SERVER_SPACE}} | ||
output_path: octopus | ||
push_package_ids: app | ||
push_version: ${{ github.ref }} |