Skip to content

chore: update ArmoniK.Extensions.Csharp to 0.12.5 (#78) #35

chore: update ArmoniK.Extensions.Csharp to 0.12.5 (#78)

chore: update ArmoniK.Extensions.Csharp to 0.12.5 (#78) #35

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
versionning:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.snapshot.outputs.version }}
release: ${{ steps.release.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Remove tag locally
# This is done so that codacy/git-version can compute the version of the images deployed on docker hub
run: |
git tag -d ${{ github.ref_name }}
- name: Compute branch for codacy
# This is the branch to give to codacy to compute the snapshot version
id: rev
run: |
export CURRENT_BRANCH=$(git describe --tags)
echo "current-branch=$CURRENT_BRANCH" >> $GITHUB_OUTPUT
- name: Generate Snapshot Version
id: snapshot
uses: codacy/[email protected]
with:
minor-identifier: "feat:"
release-branch: ${{ github.ref_name }}-pre
dev-branch: ${{ steps.rev.outputs.current-branch }}
prefix: v
- name: Generate Release Version
id: release
uses: codacy/[email protected]
with:
minor-identifier: "feat:"
release-branch: ${{ steps.rev.outputs.current-branch }}
dev-branch: main
prefix: v
- name: Put versions in step summary
run: |
echo SNAPSHOT => ${{ steps.snapshot.outputs.version }} >> $GITHUB_STEP_SUMMARY
echo RELEASE => ${{ steps.release.outputs.version }} >> $GITHUB_STEP_SUMMARY
buildImages:
runs-on: ubuntu-latest
needs:
- versionning
env:
VERSION: ${{ needs.versionning.outputs.version }}
RELEASE: ${{ needs.versionning.outputs.release }}
strategy:
fail-fast: true
matrix:
include:
- img : dockerhubaneo/armonik_demo_helloworld_worker
path : ./csharp/native/HelloWorld/Worker/Dockerfile
- img : dockerhubaneo/armonik_demo_helloworld_client
path : ./csharp/native/HelloWorld/Client/Dockerfile
- img : dockerhubaneo/armonik_demo_multipleresults_worker
path: ./csharp/native/MultipleResults/Worker/Dockerfile
- img : dockerhubaneo/armonik_demo_multipleresults_client
path : ./csharp/native/MultipleResults/Client/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ${{ matrix.path }}
context: ./csharp/native
platforms: |
linux/arm64
linux/amd64
push: true
tags: |
${{ matrix.img }}:${{ needs.versionning.outputs.release }}
${{ matrix.img }}:latest
buildProjects:
runs-on: ubuntu-latest
needs:
- versionning
env:
GENRELEASE: ${{ needs.versionning.outputs.release }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
submodules: true
- name: Build the package
run: |
dotnet build AllSamples.sln -c Release -p:Version=$(echo $GENRELEASE | sed 's/^.//')