Skip to content

Commit

Permalink
🧽 Chore ➾ Downgrade Deno version to v1.23.1 in GH Workflows (#1610)
Browse files Browse the repository at this point in the history
* Downgrade Deno version to v1.23.1 in GH Workflows

* Implement a workaround for exposing env variables
  • Loading branch information
danielelisi authored Dec 9, 2022
1 parent 5263c85 commit bad0357
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
prerelease:
required: false
type: string
deno-version:
required: true
type: string
secrets:
GCP_PROJECT:
required: true
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bad0357

Please sign in to comment.