Commit e11cba3 1 parent 477c4a9 commit e11cba3 Copy full SHA for e11cba3
File tree 3 files changed +15
-3
lines changed
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.
2
2
#
3
3
# Before triggering a release the `semver.txt` file should be updated in the
4
4
# relevant branch.
@@ -42,12 +42,23 @@ jobs:
42
42
run : |
43
43
VERSION=`cat semver.txt`
44
44
echo "##[set-output name=version;]$VERSION"
45
+ REPO=cyclonedx/cyclonedx-cli
45
46
dotnet build --configuration Release
46
47
mkdir bin
47
48
for runtime in linux-x64 linux-musl-x64 linux-arm linux-arm64 win-x64 win-x86 win-arm win-arm64 osx-x64
48
49
do
49
50
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
50
51
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 }}
51
62
52
63
- name : Create github release and git tag for release
53
64
id : create_release
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
dotnet 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