diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b3bf2ec3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: Release + +on: + release: + types: [created] + +env: + TERM: dumb + +jobs: + build-and-release: + name: Build and Upload Release Assets + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version: ^1.21 + id: go + + - name: Check out code + uses: actions/checkout@v4 + + - name: Build Linux AMD64 binary + run: make cross + + - name: Check binary permissions + run: | + cd bin + ls -la kompose-linux-amd64 + + - name: Get the version + id: vars + run: | + echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) + + - name: Upload binary to release assets + uses: https://gitea.com/cerc-io/action-gh-release@gitea-v2 + with: + files: ./bin/kompose-linux-amd64 + token: ${{ secrets.CICD_PUBLISH_TOKEN }} + + - name: Publish binary as generic package + run: | + curl --user "${{ github.repository_owner }}:${{ secrets.CICD_PUBLISH_TOKEN }}" \ + --upload-file ./bin/kompose-linux-amd64 \ + "https://git.vdb.to/api/packages/${{ github.repository_owner }}/generic/kompose/${{ steps.vars.outputs.tag }}/kompose-linux-amd64" diff --git a/Makefile b/Makefile index fdeb731d..e666b571 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,11 @@ install: .PHONY: cross cross: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-linux-amd64" main.go - GOOS=linux GOARCH=arm CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-linux-arm" main.go - GOOS=linux GOARCH=arm64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-linux-arm64" main.go - GOOS=windows GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-windows-amd64.exe" main.go - GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-darwin-amd64" main.go - GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-darwin-arm64" main.go +# GOOS=linux GOARCH=arm CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-linux-arm" main.go +# GOOS=linux GOARCH=arm64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-linux-arm64" main.go +# GOOS=windows GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-windows-amd64.exe" main.go +# GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-darwin-amd64" main.go +# GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 GO111MODULE=on go build ${BUILD_FLAGS} -installsuffix cgo -o "bin/kompose-darwin-arm64" main.go .PHONY: clean clean: diff --git a/build/VERSION b/build/VERSION index bf50e910..b2822451 100644 --- a/build/VERSION +++ b/build/VERSION @@ -1 +1 @@ -1.37.0 +1.37.0-zenith-0.0.1 diff --git a/pkg/version/version.go b/pkg/version/version.go index ad27e80f..72e080e5 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -2,7 +2,7 @@ package version var ( // VERSION is version number that will be displayed when running ./kompose version - VERSION = "1.37.0" + VERSION = "1.37.0-zenith-0.0.1" // GITCOMMIT is hash of the commit that will be displayed when running ./kompose version // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes/kompose/pkg/version.GITCOMMIT=$(GITCOMMIT)" // HEAD is default indicating that this was not set during build