diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 0fe123d..6c5e7e9 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -17,6 +17,10 @@ on: required: false type: number +defaults: + run: + working-directory: cli + env: GO_VERSION: '1.26.0' @@ -194,6 +198,7 @@ jobs: - name: Calculate PR version id: version + working-directory: cli run: | BASE_VERSION=$(grep '^version:' extension.yaml | awk '{print $2}') PR_NUMBER="${{ steps.pr.outputs.number }}" @@ -213,20 +218,24 @@ jobs: azd extension install microsoft.azd.extensions --source azd - name: Update extension.yaml with PR version + working-directory: cli run: | VERSION="${{ steps.version.outputs.version }}" sed -i "s/^version: .*/version: ${VERSION}/" extension.yaml - name: Build binaries + working-directory: cli run: | export EXTENSION_ID="jongio.azd.copilot" export EXTENSION_VERSION="${{ steps.version.outputs.version }}" azd x build --all - name: Package + working-directory: cli run: azd x pack - name: Create PR pre-release + working-directory: cli env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -246,6 +255,7 @@ jobs: ~/.azd/registry/jongio.azd.copilot/${VERSION}/* - name: Update registry + working-directory: cli env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -269,7 +279,7 @@ jobs: SHORT_COMMIT=$(echo $COMMIT | cut -c1-7) BRANCH="${{ github.ref_name }}" - cat > instructions.md < ../instructions.md <