Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
release:
permissions:
id-token: 'write'
contents: 'write'
runs-on: ubuntu-latest
env:
LD_RELEASE_VERSION: ${{ inputs.releaseVersion }}
Expand All @@ -31,8 +32,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
name: Get secrets
- name: get secrets
uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/global/services/docker/public/username = DOCKER_USERNAME, /global/services/docker/public/token = DOCKER_TOKEN, /production/common/releasing/circleci/orb-token= CIRCLECI_CLI_TOKEN, /production/common/releasing/bitbucket/username = BITBUCKET_USERNAME, /production/common/releasing/bitbucket/token = BITBUCKET_TOKEN'
Expand Down Expand Up @@ -60,13 +61,14 @@ jobs:
else
./scripts/release/publish.sh
fi
- name: Commit changes and tag
run: |
./scripts/release/commit-and-tag.sh
- name: Create Github release
ls -1a "$ARTIFACT_DIRECTORY"
- name: commit changes and tag
run: ./scripts/release/commit-and-tag.sh
- name: create Github release
Comment on lines -63 to +67
Copy link
Contributor Author

@blaqbern blaqbern Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff looks so weird here, but this is just lower-casing the names for consistency and some other minor cleanup/logging. The order is not changing here, even though it kinda looks like it from the diff.

uses: ncipollo/[email protected]
if: ${{ inputs.dryRun != 'true' }}
if: ${{ !inputs.dryRun }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ inputs.releaseVersion }}
body: ${{ inputs.changeLog }}
artifacts: ${{ env.ARTIFACT_DIRECTORY }}/*
7 changes: 2 additions & 5 deletions scripts/release/publish-dry-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

set -euo pipefail

echo ${DOCKER_TOKEN} | sudo docker login --username ${DOCKER_USERNAME} --password-stdin

sudo PATH=${PATH} GITHUB_TOKEN=${GITHUB_TOKEN} make products-for-release

mkdir -p ${ARTIFACT_DIRECTORY}
source $(dirname $0)/stage-artifacts.sh
stage_artifacts products-for-release

# Copy the Docker image that goreleaser just built into the artifacts - we only do
# this in a dry run, because in a real release the image will be available from
Expand Down
5 changes: 2 additions & 3 deletions scripts/release/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

set -euo pipefail

echo ${DOCKER_TOKEN} | sudo docker login --username ${DOCKER_USERNAME} --password-stdin

sudo PATH=${PATH} GITHUB_TOKEN=${GITHUB_TOKEN} make publish
source $(dirname $0)/stage-artifacts.sh
stage_artifacts publish

# make bitbucket and github known hosts to push successfully
mkdir -m700 ~/.ssh
Expand Down
14 changes: 14 additions & 0 deletions scripts/release/stage-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -euo pipefail

stage_artifacts() {
TARGET=$1

echo "$DOCKER_TOKEN" | sudo docker login --username "$DOCKER_USERNAME" --password-stdin

sudo PATH="$PATH" GITHUB_TOKEN="$GITHUB_TOKEN" make "$TARGET"

mkdir -p "$ARTIFACT_DIRECTORY"
cp ./dist/*.deb ./dist/*.rpm ./dist/*.tar.gz ./dist/*.txt "$ARTIFACT_DIRECTORY"
}
Loading