upgrade ci node version to 18 #152
Workflow file for this run
This file contains hidden or 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
name: CI/CD | |
on: | |
push: | |
permissions: | |
contents: write | |
env: | |
TEST_TIMEOUT: 5m | |
jobs: | |
test: | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install extension dependencies | |
run: yarn run install:all | |
- name: Build webview | |
if: matrix.os != 'macos-latest' | |
run: yarn run build:webview | |
# TODO: fix this command getting stuck on macos | |
- name: Build webview | |
if: matrix.os == 'macos-latest' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 1 | |
max_attempts: 5 | |
command: yarn run build:webview | |
- name: Run tests | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: yarn test | |
package: | |
name: Package extension | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install extension dependencies | |
run: yarn run install:all | |
- name: Build webview | |
run: yarn run build:webview | |
- name: Package extension | |
run: npx @vscode/vsce package --yarn --githubBranch ${{ github.ref_name }} | |
- name: Upload extension | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-blocks-${{ github.ref_name }}.vsix | |
path: code-blocks-*.vsix | |
release: | |
name: Release extension | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download package | |
uses: actions/download-artifact@v3 | |
with: | |
name: code-blocks-${{ github.ref_name }}.vsix | |
path: . | |
- name: Publish GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
files: code-blocks-*.vsix | |
# - name: Publish GitHub release | |
# run: npx @vscode/vsce publish -i $(ls code-blocks-*.vsix) |