update release-changelog fro 1.17.34 #22
Workflow file for this run
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: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Cache node | |
uses: actions/cache@v2 | |
with: | |
path: ~/.node | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-node | |
- name: Setup chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Build, test and deploy | |
run: | | |
mvn --batch-mode -DnewVersion=${{ steps.get_version.outputs.VERSION }} versions:set | |
mvn --batch-mode clean install | |
- name: Build Docker image | |
run: AMW_docker/build.sh | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Packages Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: docker.pkg.github.com | |
- name: Push to Docker Hub | |
run: | | |
docker tag liimaorg/liima:snapshot liimaorg/liima:${{ steps.get_version.outputs.VERSION }} | |
docker push liimaorg/liima:${{ steps.get_version.outputs.VERSION }} | |
- name: Push to GitHub Packages Docker Registry | |
run: | | |
docker tag liimaorg/liima:snapshot docker.pkg.github.com/liimaorg/liima/liima:${{ steps.get_version.outputs.VERSION }} | |
docker push docker.pkg.github.com/liimaorg/liima/liima:${{ steps.get_version.outputs.VERSION }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.VERSION }} | |
release_name: Release ${{ steps.get_version.outputs.VERSION }} | |
body: | | |
Release Changelog: <https://github.com/liimaorg/liima/blob/master/release-changelog.md> | |
GitHub Packages: <https://github.com/orgs/liimaorg/packages?repo_name=liima> | |
Docker Hub: <https://hub.docker.com/r/liimaorg/liima> | |
draft: false | |
prerelease: false | |
- name: Upload ear as 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: ./AMW_ear/target/AMW.ear | |
asset_name: AMW_ear-${{ steps.get_version.outputs.VERSION }}.ear | |
asset_content_type: application/octet-stream |