Skip to content
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
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Publish the extension on a v* tag (#4).
#
# Deliberately manual to trigger: a tag is the decision to release, and
# nothing here runs on a push to main. The Marketplace and Open VSX are
# permanent once published, so there is no undo to lean on.
name: release

on:
push:
tags: ['v*']
# So a failed publish can be retried without cutting a new tag.
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to publish (e.g. v0.1.0)'
required: true

permissions:
contents: write

jobs:
publish:
name: package and publish
runs-on: ubuntu-latest
# Job-level, not step-level: a step's `if` cannot see env defined in that
# same step, so the skip conditions below would never evaluate correctly.
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.tag || github.ref }}

- uses: actions/setup-node@v7
with:
node-version: 20
cache: npm

- run: npm ci

# The same checks CI runs. A release is not the place to find out the
# typecheck was broken.
- run: npm run check
- run: npm run build -- --production

# The tag and the manifest must agree, or the Marketplace shows a
# version nobody can find in the repository.
- name: tag matches package.json version
run: |
set -euo pipefail
tag="${{ inputs.tag || github.ref_name }}"
manifest="v$(node -p "require('./package.json').version")"
if [ "$tag" != "$manifest" ]; then
echo "::error::tag $tag does not match package.json $manifest"
exit 1
fi
echo "$tag matches the manifest"

- name: package
run: npx @vscode/vsce package --no-dependencies -o hawser.vsix

# Attached first, so a failed Marketplace publish still leaves an
# installable artifact on the release rather than nothing.
- name: attach the vsix to the release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ inputs.tag || github.ref_name }}" hawser.vsix --clobber

# Both publishes are skipped when their secret is absent, so a fork — or
# this repository before the tokens are added — gets a packaged, attached
# vsix instead of a red run.
- name: publish to the VS Code Marketplace
if: env.VSCE_PAT != ''
run: npx @vscode/vsce publish --no-dependencies --packagePath hawser.vsix

- name: publish to Open VSX
if: env.OVSX_PAT != ''
run: npx ovsx publish hawser.vsix --pat "$OVSX_PAT"
25 changes: 21 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
# Changelog

## 0.1.0 — unreleased
All notable changes to this extension are recorded here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the extension
follows [semantic versioning](https://semver.org/spec/v2.0.0.html).

The version here and the `v*` tag that publishes it must match — the release
workflow refuses to publish when they do not, because a Marketplace listing
whose version names no tag in the repository cannot be traced back to source.

## [Unreleased]

## [0.1.0] — unreleased

Initial extension.

- Engine status in the status bar: running / idle / stopped, with a click menu
### Added

- Engine state in the status bar: running / idle / stopped, with a click menu
for start, stop, restart, doctor, and refresh.
- Notifications when the engine idle-stops to free RAM or wakes back up.
- Notifications when the engine idle-stops to free RAM or wakes back up — the
state an always-on Docker Desktop has no way to show.
- `Hawser: Run Doctor` opens `hawser doctor` in a terminal.
- Talks to `hawser.exe` only through its `--json` CLI contract (Hawser ≥ 0.3.0).
- Talks to `hawser.exe` only through its `--json` CLI contract (Hawser ≥ 0.3.0),
so the extension holds no engine logic of its own.

[Unreleased]: https://github.com/hawserhq/hawser-vscode/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/hawserhq/hawser-vscode/releases/tag/v0.1.0
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Hawser for VS Code

[![CI](https://github.com/hawserhq/hawser-vscode/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hawserhq/hawser-vscode/actions/workflows/ci.yml)
[![License: Apache-2.0](https://img.shields.io/github/license/hawserhq/hawser-vscode?color=2F3B45)](LICENSE)

<!-- Add on the first Marketplace publish; until then these render "not found":
[![Marketplace](https://img.shields.io/visual-studio-marketplace/v/hawserhq.hawser?color=0a7d84&label=marketplace)](https://marketplace.visualstudio.com/items?itemName=hawserhq.hawser)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/hawserhq.hawser?color=0a7d84)](https://marketplace.visualstudio.com/items?itemName=hawserhq.hawser)
-->

See and control the [Hawser](https://github.com/hawserhq/hawser) engine — the
upstream open source Docker Engine on Windows via WSL2 — from inside VS Code.

Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"version": "0.1.0",
"publisher": "hawserhq",
"license": "Apache-2.0",
"icon": "icon.png",
"galleryBanner": { "color": "#2F3B45", "theme": "dark" },
"repository": {
"type": "git",
"url": "https://github.com/hawserhq/hawser-vscode"
Expand Down