Skip to content

cicd: add automated release. #2

cicd: add automated release.

cicd: add automated release. #2

Workflow file for this run

name: Release JAR
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Build and push to local registry
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: localhost:5000/name/app:latest
- id: extract
uses: shrink/actions-docker-extract@v1
with:
image: localhost:5000/name/app:latest
path: /release/.
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.extract.outputs.destination }}/keycloak-google-groups-mapper-${{github.ref_name}}.jar
asset_name: keycloak-google-groups-mapper-${{github.ref_name}}.jar
asset_content_type: application/java-archive