Skip to content

Commit

Permalink
Merge pull request #436 from jenkins-x-plugins/fix_release
Browse files Browse the repository at this point in the history
fix: release
  • Loading branch information
jenkins-x-bot authored Jan 20, 2025
2 parents e251850 + fcdf297 commit 559abb5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jenkins-x-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-make-linux
uses: docker://golang:1.22.3
uses: docker://golang:1.23.3
with:
args: -c "make linux"
entrypoint: /bin/sh
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-make-test
uses: docker://golang:1.22.3
uses: docker://golang:1.23.3
with:
args: -c "make test"
entrypoint: /bin/sh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/jenkins-x-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
VERSION: ${{ steps.prep.outputs.version }}
name: release-binary
uses: docker://golang:1.22.3
uses: docker://golang:1.23.3
with:
args: -c "make release"
entrypoint: bash
Expand All @@ -31,15 +31,15 @@ jobs:
REPO_NAME: ${{ github.event.repository.name }}
VERSION: ${{ steps.prep.outputs.version }}
name: changelog
uses: docker://ghcr.io/jenkins-x/jx-boot:3.10.150
uses: docker://ghcr.io/jenkins-x/jx-boot:latest
with:
entrypoint: .github/workflows/jenkins-x/changelog.sh
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.prep.outputs.version }}
name: upload-binaries
uses: docker://ghcr.io/jenkins-x/jx-goreleaser-image:0.2.2@sha256:77a7c9b281e8dba01f77d0d46c5bd9834a7bd435570f3396a03bfe63554f03f0
uses: docker://ghcr.io/jenkins-x/jx-goreleaser-image:1.0.0@sha256:35070795367fea9a789c1c3a138b5e32262e4253d38e47406ba9ab7833ff15b2
with:
entrypoint: .github/workflows/jenkins-x/upload-binaries.sh
- name: Set up QEMU
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/jenkins-x/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ fi

# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
jx changelog create --verbose --header-file=hack/changelog-header.md --version=$VERSION --rev=$PULL_BASE_SHA --output-markdown=changelog.md --update-release=false

jx changelog create --verbose --version=$VERSION --rev=$PULL_BASE_SHA --output-markdown=changelog.md
4 changes: 0 additions & 4 deletions .github/workflows/jenkins-x/upload-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ echo current git configuration

# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global --get user.name
git config --global --get user.email

echo "setting git user"

Expand All @@ -15,8 +13,6 @@ git config --global user.email "[email protected]"

git add * || true
git commit -a -m "chore: release $VERSION" --allow-empty
git tag -fa v$VERSION -m "Release version $VERSION"
git push origin v$VERSION

export BRANCH=$(git rev-parse --abbrev-ref HEAD)
export BUILDDATE=$(date)
Expand Down
20 changes: 5 additions & 15 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,65 @@
version: 2
env:
- GO111MODULE=on
- CGO_ENABLED=0
before:
hooks:
- go mod download

builds:
- id: jx-promote
# Path to main.go file or main package.
# Default is `.`.
main: ./cmd/main.go

# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
binary: jx-promote

# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -X "github.com/jenkins-x-plugins/jx-promote/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.GoVersion={{.Env.GOVERSION}}"

# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
- windows
- darwin
- linux

# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386 and amd64.
goarch:
- arm64
- amd64

ignore:
- goos: windows
goarch: arm64
archives:
- name_template: "jx-promote-{{ .Os }}-{{ .Arch }}"
format_overrides:
- goos: windows
format: zip

checksum:
# You can change the name of the checksums file.
# Default is `jx-promote_{{ .Version }}_checksums.txt`.
name_template: "jx-promote-checksums.txt"

# Algorithm to be used.
# Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384.
# Default is sha256.
algorithm: sha256

changelog:
# set it to true if you wish to skip the changelog generation
skip: true

disable: true
release:
# If set to true, will not auto-publish the release.
# Default is false.
draft: false

# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: false

# You can change the name of the GitHub release.
# Default is `{{.Tag}}`
name_template: "{{.Env.VERSION}}"

sboms:
- artifacts: archive

0 comments on commit 559abb5

Please sign in to comment.