Pre-release - Robocorp Code Extension #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version' | |
required: true | |
name: Pre-release - Robocorp Code Extension | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./robocorp-code | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Yarn install | |
run: yarn install | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install deps | |
run: pip install --upgrade pip fire twine wheel setuptools | |
- name: Update version | |
run: python -m dev set-version ${{ github.event.inputs.version }} | |
- name: Update vscode required version | |
run: python codegen/codegen_package.py | |
env: | |
PYTHONPATH: src | |
- name: Vendor robocorp_ls_core | |
run: python -m dev vendor-robocorp-ls-core | |
- name: Fix README references | |
run: python -m dev fix-readme | |
- name: Generate LICENSE.md | |
run: python -m dev generate-license-file | |
- name: Build wheel | |
working-directory: ./robocorp-code/src | |
run: | | |
cp ../README.md ./README.md | |
python setup.py sdist bdist_wheel --universal | |
- run: npm install -g vsce@2.15.0 | |
# Platforms: win32-x64, win32-ia32, win32-arm64, linux-x64, linux-arm64, linux-armhf, alpine-x64, alpine-arm64, darwin-x64, darwin-arm64 and web. | |
# Deal with Windows -------------- | |
- name: Download rcc for windows | |
run: python -m dev download-rcc win32 | |
- run: vsce package --pre-release --target win32-x64 -o robocorp-code-win32-x64.vsix | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: robocorp-code-win32-x64.vsix | |
path: ./robocorp-code/robocorp-code-win32-x64.vsix | |
- name: Publish pre-release to vscode marketplace | |
run: vsce publish --packagePath ./robocorp-code-win32-x64.vsix -p $VSCE_TOKEN --pre-release | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
# Deal with Linux -------------- | |
- name: Download rcc for linux | |
run: python -m dev download-rcc linux | |
- run: vsce package --pre-release --target linux-x64 -o robocorp-code-linux-x64.vsix | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: robocorp-code-linux-x64.vsix | |
path: ./robocorp-code/robocorp-code-linux-x64.vsix | |
- name: Publish pre-release to vscode marketplace | |
run: vsce publish --packagePath ./robocorp-code-linux-x64.vsix -p $VSCE_TOKEN --pre-release | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
# Deal with Darwin -------------- | |
- name: Download rcc for darwin | |
run: python -m dev download-rcc darwin | |
- run: vsce package --pre-release --target darwin-x64 -o robocorp-code-darwin-x64.vsix | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: robocorp-code-darwin-x64.vsix | |
path: ./robocorp-code/robocorp-code-darwin-x64.vsix | |
- name: Publish pre-release to vscode marketplace | |
run: vsce publish --packagePath ./robocorp-code-darwin-x64.vsix -p $VSCE_TOKEN --pre-release | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |