Skip to content

Commit

Permalink
makes release more normal
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Dec 31, 2023
1 parent 990ca7a commit 7e9d929
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Prevent use of implicit GitHub Actions read-only token GITHUB_TOKEN.
token: ${{ secrets.GH_TOKEN }}

- name: Configure Git
run: | # Allocate commits to CI, not the owner of the deploy key
Expand All @@ -30,9 +33,8 @@ jobs:

- name: Prepare release
run: |
git remote set-url origin https://${{ secrets.GH_TOKEN }}:[email protected]/$GITHUB_REPOSITORY.git
build-bin/git/login_git &&
build-bin/helm/helm_prepare $(echo ${GITHUB_REF} | cut -d/ -f 3) ${{ steps.appVersion.outputs.tag }}
git remote set-url origin https://github.com/$GITHUB_REPOSITORY.git
- name: Run chart-releaser
uses: helm/[email protected]
Expand Down
24 changes: 24 additions & 0 deletions build-bin/git/login_git
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Copyright 2023 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#

set -ue

# Allocate commits to CI, not the owner of the deploy key
git config user.name "zipkinci"
git config user.email "[email protected]"

# Setup https authentication credentials, used by ./mvnw release:prepare
git config credential.helper "store --file=.git/credentials"
echo "https://$GH_TOKEN:@github.com" > .git/credentials

0 comments on commit 7e9d929

Please sign in to comment.