Skip to content

CLI: replace keytar with custom solution (#4750) #14

CLI: replace keytar with custom solution (#4750)

CLI: replace keytar with custom solution (#4750) #14

Workflow file for this run

name: agent-release
on:
push:
tags:
- agent-v*
jobs:
release:
if: github.repository == 'sourcegraph/cody'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write # for publishing the release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # SECURITY: pin third-party action hashes
with:
run_install: true
- uses: MOZGIII/install-ldid-action@d5ab465f3a66a4d60a59882b935eb30e18e8d043 # SECURITY: pin third-party action hashes
with:
tag: v2.1.5-procursus7
- name: get release version
id: release_version
run: |
TAGGED_VERSION="${GITHUB_REF/refs\/tags\/agent-v/}"
if [[ ! "${TAGGED_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "Invalid version tag '${TAGGED_VERSION}'"
exit 1
fi
echo "EXT_VERSION=${TAGGED_VERSION}" >> $GITHUB_ENV
WRITTEN_VERSION="$(cat agent/package.json | jq '.version' -r)"
if [[ "${TAGGED_VERSION}" != "${WRITTEN_VERSION}" ]]; then
echo "Release tag and version in agent/package.json do not match: '${TAGGED_VERSION}' vs. '${WRITTEN_VERSION}'"
exit 1
fi
- run: pnpm build
- run: pnpm run test
- name: Set npm publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks agent