deploy #37
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
name: Release | |
on: [repository_dispatch] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: adopt | |
java-version: 17 | |
architecture: x64 | |
- name: maven-settings-xml-action | |
uses: whelk-io/maven-settings-xml-action@v4 | |
with: | |
servers: '[{ "id": "github", "privateKey": "${{ secrets.DEPLOYMENT_KEY }}", "username": "${{ github.actor }}", "password": "${{ secrets.DEPLOYMENT_KEY }}" }]' | |
- name: Maven stats | |
run: ./mvnw.cmd -version | |
- name: Bump to release version | |
run: ./mvnw.cmd --% -B org.codehaus.mojo:build-helper-maven-plugin:3.0.0:parse-version versions:set versions:commit -DnewVersion="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" | |
- name: Package | |
run: ./mvnw.cmd -B package -DexcludedGroups=ui | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m "release version" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: create tag | |
run: ./mvnw.cmd --% org.codehaus.mojo:exec-maven-plugin:1.6.0:exec -Dexec.executable="git" -Dexec.args="tag ${project.version}" -pl milkman | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
tags: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy | |
run: ./mvnw.cmd -B deploy -DskipTests | |
- name: Bump version to next dev version | |
run: ./mvnw.cmd --% -B org.codehaus.mojo:build-helper-maven-plugin:3.0.0:parse-version versions:set versions:commit -DnewVersion="${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0-SNAPSHOT" | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m "preparing next version" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |