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
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 0.1.0)'
description: 'Version to release (e.g., 1.0.0)'
required: true
type: string

Expand All @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'
cache: 'npm'

- name: Install dependencies
Expand All @@ -46,13 +46,13 @@ jobs:
git tag -f v${{ inputs.version }}
git push origin v${{ inputs.version }} --force

# Also update major version tag (e.g., v0 for v0.1.0)
# Also update major version tag (e.g., v1 for v1.0.0)
MAJOR=$(echo "${{ inputs.version }}" | cut -d. -f1)
git tag -f v${MAJOR}
git push origin v${MAJOR} --force

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
tag_name: v${{ inputs.version }}
name: v${{ inputs.version }}
Expand Down
56 changes: 34 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,47 @@ on:
jobs:
test:
runs-on: windows-latest

strategy:
matrix:
version: [ '1.3.0', 'latest' ]

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'

- name: Install dependencies
run: npm install
- name: Build action
run: npm run package
run: npm ci

- name: Check TypeScript
run: npm run build

- name: Setup covdbg
id: setup-covdbg
uses: ./
with:
version: '1.0.0-beta.1+242'

- name: Verify covdbg is in PATH
version: ${{ matrix.version }}

- name: Verify covdbg installation
shell: pwsh
env:
EXPECTED_VERSION: ${{ matrix.version }}
COVDBG_PATH: ${{ steps.setup-covdbg.outputs.covdbg-path }}
run: |
Write-Host "Checking if covdbg is available..."
Get-Command covdbg -ErrorAction SilentlyContinue
if ($?) {
Write-Host "✓ covdbg is in PATH"
} else {
Write-Host "✗ covdbg is not in PATH"
exit 1
$command = Get-Command covdbg -ErrorAction Stop
if ($command.Source -ne (Join-Path $env:COVDBG_PATH 'covdbg.exe')) {
throw 'covdbg does not resolve to the action output directory.'
}
if (-not (Test-Path (Join-Path $env:COVDBG_PATH 'libcovdbg.dll'))) {
throw 'libcovdbg.dll is missing from the installation.'
}
$version = covdbg --version
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host $version
if ($env:EXPECTED_VERSION -ne 'latest' -and $version -ne "covdbg $env:EXPECTED_VERSION") {
throw "Expected covdbg $env:EXPECTED_VERSION, got $version."
}
shell: pwsh
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ Test your changes locally using the test workflow:
3. Update the README.md with details of changes if applicable
4. Your PR will be reviewed by maintainers

## Releasing

After the changes are merged into `main`, run the **Release** workflow on `main` with version `1.0.0`:

```bash
gh workflow run release.yml --ref main -f version=1.0.0
```

The workflow rebuilds the action, publishes the `v1.0.0` release, and updates the `v1` tag used by `liasoft/setup-covdbg@v1`. Changing `package.json` alone does not create these Git tags. The action version is independent of the covdbg version selected through the `version` input.

## Questions?

Open an issue for discussion or clarification.
44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Add this action to your workflow:
```yaml
steps:
- name: Setup covdbg
uses: covdbg/setup-covdbg@v1
uses: liasoft/setup-covdbg@v1
with:
version: '1.0.0'
version: '1.3.0'

- name: Run covdbg
run: covdbg --version
Expand All @@ -33,12 +33,12 @@ steps:

### `version` (required)

The version of covdbg to download and setup. This should be a semantic version string (e.g., `1.0.0`, `2.1.3`).
The version of covdbg to download and setup. Use `1.3.0` for the stable release or `latest` to follow the latest published release. Pin a version for reproducible workflows.

**Example:**
```yaml
with:
version: '1.0.0'
version: '1.3.0'
```

## Outputs
Expand All @@ -51,9 +51,9 @@ The path where covdbg was installed and cached.
```yaml
- name: Setup covdbg
id: setup-covdbg
uses: covdbg/setup-covdbg@v1
uses: liasoft/setup-covdbg@v1
with:
version: '1.0.0'
version: '1.3.0'

- name: Display installation path
run: echo "Covdbg installed at ${{ steps.setup-covdbg.outputs.covdbg-path }}"
Expand All @@ -76,27 +76,40 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup covdbg
uses: covdbg/setup-covdbg@v1
uses: liasoft/setup-covdbg@v1
with:
version: '1.0.0'
version: '1.3.0'

- name: Verify covdbg installation
run: |
covdbg --version
covdbg --help
```

## Collecting coverage

Public repositories are free, but CI still authenticates with a project token. Installing covdbg does not sign in to the license service. To collect coverage in CI, add a `COVDBG_PROJECT_TOKEN` Actions secret containing a covdbg project token authorized for your repository, then pass it to the coverage step:

```yaml
- name: Collect coverage
shell: pwsh
env:
COVDBG_PROJECT_TOKEN: ${{ secrets.COVDBG_PROJECT_TOKEN }}
run: covdbg --config .covdbg.yaml --output coverage.covdb .\build\Debug\test_app.exe
```

See [liasoft/covdbg-quick-start](https://github.com/liasoft/covdbg-quick-start) for a complete C++ example. For local use, sign in with `covdbg login`.

## How It Works

This action uses the GitHub Actions Toolkit, specifically:
- **@actions/core**: For getting inputs, setting outputs, and logging
- **@actions/tool-cache**: For downloading, extracting, and caching the covdbg binary

The action performs the following steps:
1. Reads the `version` input parameter (or uses 'latest')
1. Reads the `version` input parameter (required; use an explicit version or `latest`)
2. Constructs the download URL for the specified version from covdbg.com
3. Downloads the covdbg.zip archive containing covdbg.exe and libcovdbg.dll
4. Extracts the archive
Expand All @@ -106,16 +119,16 @@ The action performs the following steps:

## Requirements

- Runs on Windows runners (windows-latest, windows-2022, windows-2019)
- Requires Node.js 20 runtime (automatically available on GitHub-hosted runners)
- Runs on Windows runners (windows-latest or windows-2022)
- Requires the Node.js 24 action runtime and Actions Runner 2.327.1 or newer (automatically available on GitHub-hosted runners)

## Development

To build and package the action:

```bash
# Install dependencies
npm install
npm ci

# Build TypeScript
npm run build
Expand All @@ -124,7 +137,8 @@ npm run build
npm run package
```

**Note**: The `dist/` directory is not tracked in git. You must build the action locally before testing or using it.
> [!NOTE]
> The `dist/` directory is tracked in Git and is what GitHub Actions executes. Commit regenerated `dist/` files whenever the action source changes.

## License

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ branding:
color: 'blue'
inputs:
version:
description: 'Version of covdbg to download (e.g., 1.0.0, latest)'
description: 'Version of covdbg to download (e.g., 1.3.0, latest)'
required: true
outputs:
covdbg-path:
description: 'Path where covdbg was installed'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-covdbg",
"version": "0.1.0",
"version": "1.0.0",
"description": "GitHub Action to download and setup covdbg on Windows runners",
"main": "dist/index.js",
"scripts": {
Expand All @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/covdbg/setup-covdbg.git"
"url": "git+https://github.com/liasoft/setup-covdbg.git"
},
"keywords": [
"actions",
Expand Down