File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1- # This workflow is used for publishing the NuGet package and Docker image.
1+ # This workflow is used for publishing the binaries and Docker image.
22#
33# Before triggering a release the `semver.txt` file should be updated in the
44# relevant branch.
@@ -42,12 +42,23 @@ jobs:
4242 run : |
4343 VERSION=`cat semver.txt`
4444 echo "##[set-output name=version;]$VERSION"
45+ REPO=cyclonedx/cyclonedx-cli
4546 dotnet build --configuration Release
4647 mkdir bin
4748 for runtime in linux-x64 linux-musl-x64 linux-arm linux-arm64 win-x64 win-x86 win-arm win-arm64 osx-x64
4849 do
4950 dotnet publish cyclonedx/cyclonedx.csproj -r $runtime --configuration Release --version-suffix $VERSION --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output bin/$runtime
5051 done
52+ docker build -f Dockerfile --build-arg VERSION=$VERSION -t $REPO:$VERSION -t $REPO:latest .
53+
54+ - name : Publish Docker image to Docker Hub
55+ env :
56+ DOCKER_TOKEN : ${{ secrets.DOCKER_TOKEN }}
57+ run : |
58+ REPO=cyclonedx/cyclonedx-cli
59+ docker login --username coderpatros --password "$DOCKER_TOKEN"
60+ docker push $REPO:latest
61+ docker push $REPO:${{ steps.create_binaries.outputs.version }}
5162
5263 - name : Create github release and git tag for release
5364 id : create_release
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22dotnet publish cyclonedx/cyclonedx.csproj -r linux-x64 --configuration Release --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output bin/linux-x64
3- docker build . --tag cyclonedx/cyclonedx-cli
3+ docker build . --tag cyclonedx/cyclonedx-cli
4+ docker run cyclonedx/cyclonedx-cli
Original file line number Diff line number Diff line change 1- 0.0.3
1+ 0.0.4
You can’t perform that action at this time.
0 commit comments