Skip to content

Commit

Permalink
Release build workflow (#13616)
Browse files Browse the repository at this point in the history
Along the way, factor out a chunk of the steps required to build the VSIX.
  • Loading branch information
brettcannon authored Aug 26, 2020
1 parent 137b83f commit 7ccf189
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 20 deletions.
34 changes: 34 additions & 0 deletions .github/actions/build-vsix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Build VSIX'
description: "Build the extension's VSIX"

outputs:
path:
description: 'Path to the VSIX'
value: 'ms-python-insiders.vsix'

runs:
using: 'composite'
steps:
# For faster/better builds of sdists.
- run: python -m pip install wheel
shell: bash

- run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
shell: bash

- run: |
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
python ./pythonFiles/install_debugpy.py
shell: bash
- run: npm ci --prefer-offline
shell: bash

# Use the GITHUB_RUN_ID environment variable to update the build number.
# GITHUB_RUN_ID is a unique number for each run within a repository.
# This number does not change if you re-run the workflow run.
- run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID
shell: bash

- run: npm run package
shell: bash
25 changes: 5 additions & 20 deletions .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,12 @@ jobs:
- name: Upgrade pip
run: python -m pip install -U pip

- name: Install Python requirements
run: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
- name: Install debugpy with wheels
run: |
python -m pip install wheel
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
python ./pythonFiles/install_debugpy.py
- name: Install dependencies (npm ci)
run: npm ci --prefer-offline

# Use the GITHUB_RUN_ID environment variable to update the build number.
# GITHUB_RUN_ID is a unique number for each run within a repository.
# This number does not change if you re-run the workflow run.
- name: Update build number
run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID
- name: Build VSIX
uses: ./.github/actions/build-vsix
id: build-vsix

- name: Create the VSIX
run: npm run package
- name: Rename VSIX
run: mv ${{ steps.build-vsix.outputs.path }} ${{ env.VSIX_NAME }}

- uses: actions/upload-artifact@v2
with:
Expand Down
Loading

0 comments on commit 7ccf189

Please sign in to comment.