Skip to content

fix: Avoid materializing S3 lib in memory (#288) #33

fix: Avoid materializing S3 lib in memory (#288)

fix: Avoid materializing S3 lib in memory (#288) #33

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- "[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
run: |
git tag -d ${{ github.ref_name }}
- name: Compute branch for codacy
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 }}
- name: Generate Release Version
id: release
uses: codacy/[email protected]
with:
minor-identifier: "feat:"
release-branch: ${{ steps.rev.outputs.current-branch }}
dev-branch: main
- name: Put versions in step summary
run: |
echo SNAPSHOT => ${{ steps.snapshot.outputs.version }} >> $GITHUB_STEP_SUMMARY
echo RELASE => ${{ steps.release.outputs.version }} >> $GITHUB_STEP_SUMMARY
- name: Validate tag
run : test ${{ steps.release.outputs.version }} == ${{ github.ref_name }}
- name: Delete tag if invalid
if: failure() || cancelled()
run : git push origin -d ${{ github.ref_name }}
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 ArmoniK.Extensions.Csharp.sln -c Release -p:Version=$GENRELEASE
- name: Pack the package VERSION
run: |
dotnet pack ArmoniK.Extensions.Csharp.sln -c Release -o /tmp/packages -p:Version=$GENRELEASE
- name: Push the package
run: |
find /tmp/packages -name 'ArmoniK*.nupkg' ! -name '*test*.nupkg' -exec dotnet nuget push {} -k ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols \;
buildImages:
runs-on: ubuntu-latest
needs:
- versionning
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@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4
with:
file: Worker/src/DLLWorker/Dockerfile
context: .
platforms: |
linux/arm64
linux/amd64
push: true
tags: |
dockerhubaneo/armonik_worker_dll:${{ needs.versionning.outputs.release }}
dockerhubaneo/armonik_worker_dll:latest