Skip to content

feat(release): automate release #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- main

jobs:
build:
name: test (${{ matrix.os }}, node-${{ matrix.node }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [18.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.config.node }}
- name: Install Dependencies
run: npm ci
- name: Check Format
run: npm run format && git diff --exit-code
- name: Test
uses: coactions/setup-xvfb@v1
with:
run: npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
id: release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
outputs:
release_version: ${{ steps.release.outputs.release_version }}
27 changes: 0 additions & 27 deletions .github/workflows/ci.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: PR Title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# vscode-arduino-api

[![Tests](https://github.com/dankeboy36/vscode-arduino-api/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dankeboy36/vscode-arduino-api/actions/workflows/ci.yml)
[![Build](https://github.com/dankeboy36/vscode-arduino-api/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/dankeboy36/vscode-arduino-api/actions/workflows/build.yml)

[Arduino IDE](<(https://github.com/arduino/arduino-ide)>) API for VS Code extensions.
[Arduino IDE](https://github.com/arduino/arduino-ide) API for VS Code extensions.

This VS Code extension does not provide any functionality but a bridge between the Arduino IDE and external tools implemented as a VS Code extension. Please reference [arduino/arduino-ide#58](https://github.com/arduino/arduino-ide/issues/58) to explain why this VSIX has been created.
This VS Code extension does not provide any functionality but a bridge between the Arduino IDE and external tools implemented as a VS Code extension. Please reference [arduino/arduino-ide#58](https://github.com/arduino/arduino-ide/issues/58) to see why this VSIX has been created.

> ⚠️ This extension has nothing to do with the [Visual Studio Code extension for Arduino](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino). This extension does not work in VS Code.
> ⚠️ This extension has nothing to do with the [Visual Studio Code extension for Arduino](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino).

## API

Exposes the Arduino context for VS Code extensions:
Exposes the Arduino state for VS Code extensions:

| Name | Description | Type | Note |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | ----------- |
| Name | Description | Type | Note |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | :---------: |
| `sketchPath` | Absolute filesystem path of the sketch folder. | `string` |
| `compileSummary` | The summary of the latest sketch compilation. When the `sketchPath` is available, but the sketch has not been verified (compiled), the `buildPath` can be `undefined`. | `CompileSummary` | ⚠️ `@alpha` |
| `fqbn` | The Fully Qualified Board Name (FQBN) of the currently selected board in the Arduino IDE. | `string` |
Expand Down Expand Up @@ -82,7 +82,7 @@ This extension contributes the following settings:

---

- Q: What does `@alpha` mean?
- Q: What does ⚠️ `@alpha` mean?
- A: This API is in an alpha state and might change. The initial idea of this project was to establish a bare minimum layer and help Arduino IDE tool developers start with something. I make breaking changes only when necessary, keep it backward compatible, or provide a migration guide in the future. Please prepare for breaking changes.

---
Expand All @@ -92,15 +92,5 @@ This extension contributes the following settings:

---

- Q: I cannot find the `dankeboy36.vscode-arduino-api` extension in neither the [VS Code Marketplace](https://marketplace.visualstudio.com/vscode) nor [Open VSX Registry](https://open-vsx.org/).
- A: Correct. This solution targets the [Arduino IDE](https://github.com/arduino/arduino-ide) 2.x. The IDE will contain this VSIX at runtime and will activate it before your tool VSIX. You do not even have to add `dankeboy36.vscode-arduino-api` to the `extensionDependencies`. I might publish the VSIX later when it works in VS Code. By the way, the VSIX is signed by a verified publisher. You can get the latest version from the GitHub [release page](https://github.com/dankeboy36/vscode-arduino-api/releases/latest).

---

- Q: Are there any dependent examples?
- A: Yes, for example, [dankeboy36/esp-exception-decoder](https://github.com/dankeboy36/esp-exception-decoder).

---

- Q: Are there plans to support it in VS Code?
- A: Sure.
Loading