From bad035711ca9b79f66ed26a45c941dd2645bff59 Mon Sep 17 00:00:00 2001 From: Daniele Lisi <22307776+danielelisi@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:05:36 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=BD=20Chore=20=E2=9E=BE=20Downgrade=20?= =?UTF-8?q?Deno=20version=20to=20v1.23.1=20in=20GH=20Workflows=20(#1610)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Downgrade Deno version to v1.23.1 in GH Workflows * Implement a workaround for exposing env variables --- .github/workflows/main.yml | 19 ++++++++++++++++--- .github/workflows/vscode-extension.yml | 5 ++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 474e4f251..ee91c4534 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,9 @@ concurrency: group: ${{ github.ref_name || github.ref }} cancel-in-progress: true +env: + DENO_VERSION: '1.23.1' + jobs: # When we use reusable we lose the ability to to filter out the workflow for changes to certain paths. # This job creates boolean outputs based on path filters. These outputs can then be used as job conditions @@ -84,7 +87,7 @@ jobs: - name: Setup Deno uses: denoland/setup-deno@v1 with: - deno-version: "1.23.4" + deno-version: "${{ env.DENO_VERSION }}" ## This job will compile the binary for the target OS. The binary is then tested by initializing a project called "test_project" ## If the initialization command output is equal to "Project taq'ified!" we know that the binary works for the given os, else the command exits with status code 1. @@ -195,7 +198,7 @@ jobs: - uses: denoland/setup-deno@v1 with: - deno-version: "1.23.4" + deno-version: "${{ env.DENO_VERSION }}" - name: Add working dir to PATH run: echo "$(pwd)" >> $GITHUB_PATH @@ -289,15 +292,25 @@ jobs: run: | echo ${NODE_AUTH_TOKEN} >> ~/.npmrc npm publish --workspaces --tag 'latest' --access public --registry $NPM_REGISTRY - + + # Workaround for exposing env context to reusable workflows + # TODO: Refactor once https://github.com/orgs/community/discussions/26671 is resolved + expose-env-vars: + runs-on: ubuntu-latest + outputs: + deno_version: ${{ env.DENO_VERSION }} + steps: + - run: echo "Exposing env.DENO_VERSION for reusable workflow" vscode-extension-workflow: needs: - workflow-setup - publish-npm-packages + - expose-env-vars if: ${{ !github.event.pull_request.head.repo.fork }} uses: ./.github/workflows/vscode-extension.yml with: prerelease: ${{ needs.workflow-setup.outputs.prerelease }} + deno-version: ${{ needs.vscode-extension.outputs.deno_version }} secrets: GCP_PROJECT: ${{ secrets.GCP_PROJECT }} GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} diff --git a/.github/workflows/vscode-extension.yml b/.github/workflows/vscode-extension.yml index 6d38b9648..0d08c94c3 100644 --- a/.github/workflows/vscode-extension.yml +++ b/.github/workflows/vscode-extension.yml @@ -6,6 +6,9 @@ on: prerelease: required: false type: string + deno-version: + required: true + type: string secrets: GCP_PROJECT: required: true @@ -52,7 +55,7 @@ jobs: - name: Install Deno uses: denoland/setup-deno@v1 with: - deno-version: "1.23.4" + deno-version: "${{ inputs.deno-version }}" - name: Attempt to rebuild run: npm rebuild | true