Skip to content

Commit

Permalink
release configs (#38)
Browse files Browse the repository at this point in the history
* Release configuration using github actions

### What's done:
* Add artipie credentials via settings.xml
* Various fixes to workflow
  • Loading branch information
petertrr authored Jul 8, 2020
1 parent 2f17e39 commit d3b1943
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -57,4 +59,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
tags: false
tags: false

0 comments on commit d3b1943

Please sign in to comment.