-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release configuration using github actions ### What's done: * Add artipie credentials via settings.xml * Various fixes to workflow
- Loading branch information
Showing
1 changed file
with
13 additions
and
11 deletions.
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 |
---|---|---|
|
@@ -18,12 +18,16 @@ jobs: | |
with: | ||
java-version: 1.11 | ||
- name: Set environment variables | ||
run: | | ||
echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#'refs/tags/v'} | ||
echo Building release for version ${{ env.RELEASE_VERSION }} | ||
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#'refs/tags/v'} | ||
- name: Set version | ||
run: mvn -B versions:set -DnewVersion=${{ env.RELEASE_VERSION }} versions:commit | ||
- name: Create Release | ||
- name: Create settings.xml | ||
uses: whelk-io/maven-settings-xml-action@v9 | ||
with: | ||
servers: '[{ "id": "artipie", "username": "${{ secrets.ARTIPIE_USER }}", "password": "${{ secrets.ARTIPIE_PASSWORD }}" }]' | ||
- name: Deploy artifacts | ||
run: mvn -B clean deploy | ||
- name: Create Github Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
|
@@ -33,22 +37,20 @@ jobs: | |
release_name: Release ${{ env.RELEASE_VERSION }} | ||
draft: false | ||
prerelease: false | ||
- name: Deploy artifacts | ||
run: mvn -B clean deploy -Dusername=${{ secrets.ARTIPIE_USER }} -Dpassword=${{ secrets.ARTIPIE_PASSWORD }} | ||
- name: Upload assets to github releases | ||
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: ./diktat-rules/target/diktat-rules-${{ env.RELEASE_VERSION }}-jar-with-dependencies.jar | ||
asset_name: diktat-rules-${{ env.RELEASE_VERSION }}-jar-with-dependencies.jar | ||
asset_path: ./diktat-rules/target/diktat.jar | ||
asset_name: diktat.jar | ||
asset_content_type: application/zip | ||
- name: Increment development version | ||
- name: Set next snapshot version | ||
run: | | ||
mvn -B versions:set -DnextSnapshot=true -DprocessAllModules=true versions:commit | ||
git add *pom.xml | ||
git add . | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "diktat_build" | ||
git commit -m "Prepare next development iteration" | ||
|
@@ -57,4 +59,4 @@ jobs: | |
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master | ||
tags: false | ||
tags: false |