Skip to content

Release

Release #33

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
check-latest: false
- name: Build with Maven
run: mvn -B install -DskipTests
- name: Create Tag
run: |
echo "RELEASE_TAG=`cat ./src/main/resources/.version`" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ./target/redis-rdb-cli-release.tar.gz,./target/redis-rdb-cli-release.zip
tag: ${{ env.RELEASE_TAG }}
name: ${{ env.RELEASE_TAG }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push latest
id: latest
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:latest
- name: Build and Push ${{ env.RELEASE_TAG }}
id: tag
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:${{ env.RELEASE_TAG }}
- name: Build and Push latest-native
id: latest-native
uses: docker/build-push-action@v4
with:
context: ./
file: ./DockerfileNative
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:latest-native
- name: Build and Push ${{ env.RELEASE_TAG }}-native
id: tag-native
uses: docker/build-push-action@v4
with:
context: ./
file: ./DockerfileNative
push: true
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.REPO }}:${{ env.RELEASE_TAG }}-native
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}