Skip to content

Commit

Permalink
fix: Release Please fails to publish (#246)
Browse files Browse the repository at this point in the history
chore: release trunk (#243)

docs: Update main README.md with Version 3.x.x info (#245)

fix:  Clean up publish action (#244)

Only perform lint on CI (drop lint-skypack)
Add publish support to release-please

feat:  Bump Versions (#241)

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Aug 14, 2024
1 parent c522aec commit fccd582
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 120 deletions.
77 changes: 75 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,84 @@ name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: googleapis/release-please-action@v4
- name: Initialize Release Please
id: release
uses: googleapis/release-please-action@v4
with:
target-branch: ${{ github.ref_name }}
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

- name: Checkout Sources
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Install NodeJS
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@hpcc-js"

- name: Install OS Dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y git cmake ninja-build wget zip
sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
sudo apt-get install -y python3 python3-pip
sudo apt-get install -y chromium
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
npm ci
npm run install-build-deps
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
npm run build
- name: Test
if: ${{ steps.release.outputs.release_created }}
env:
CI: true
run: |
npm run test
- name: Calculate Coverage
if: ${{ steps.release.outputs.release_created }}
run: |
npm run coverage
npm run coverage-report
- name: Update Coveralls
if: ${{ steps.release.outputs.release_created }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm publish
- name: Purge jsdelivr
if: ${{ steps.release.outputs.release_created }}
run: |
npm run purge-jsdelivr
27 changes: 2 additions & 25 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-and-publish
name: Test PR

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
Expand Down Expand Up @@ -63,30 +63,7 @@ jobs:
npm run test
- name: Calculate Coverage
if: ${{ matrix.node == 20 }}
run: |
npm run coverage
npm run coverage-report
- name: Update Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
if: github.ref_type == 'tag'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm publish ${{ contains(github.ref, 'next') && '--tag next' || '' }}
- name: Purge jsdelivr
if: github.ref_type == 'tag'
run: |
npm run purge-jsdelivr
- name: Create Release
if: github.ref_type == 'tag'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref, '-next.') }}
14 changes: 7 additions & 7 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
".": "3.0.0",
"packages/base91": "1.1.0",
"packages/duckdb": "1.1.0",
"packages/expat": "1.1.0",
"packages/graphviz": "1.1.0",
"packages/graphviz-cli": "1.1.0",
"packages/wasm": "3.1.0",
"packages/zstd": "1.1.0"
"packages/base91": "1.0.2",
"packages/duckdb": "1.0.1",
"packages/expat": "1.0.1",
"packages/graphviz": "1.0.3",
"packages/graphviz-cli": "1.0.4",
"packages/zstd": "1.0.2",
"packages/wasm": "2.18.3"
}
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @hpcc-js/wasm - Version 2
# @hpcc-js/wasm - Version 3

![Tests](https://github.com/hpcc-systems/hpcc-js-wasm/workflows/Test%20PR/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/GordonSmith/hpcc-js-wasm/badge.svg?branch=BUMP_VERSIONS)](https://coveralls.io/github/GordonSmith/hpcc-js-wasm?branch=BUMP_VERSIONS)
Expand All @@ -9,7 +9,7 @@ This repository contains a collection of useful c++ libraries compiled to WASM f
- [base91](https://base91.sourceforge.net/) - v0.6.0
- [duckdb](https://github.com/duckdb/duckdb) - v0.9.2
- [expat](https://libexpat.github.io/) - v2.6.2
- [graphviz](https://www.graphviz.org/) - v12.0.0
- [graphviz](https://www.graphviz.org/) - v12.1.0
- [zstd](https://github.com/facebook/zstd) - v1.5.6
- ...more to follow...

Expand All @@ -25,10 +25,23 @@ Built with:
* [Graphviz](https://hpcc-systems.github.io/hpcc-js-wasm/graphviz/classes/Graphviz.html)
* [Zstd](https://hpcc-systems.github.io/hpcc-js-wasm/zstd/classes/Zstd.html)

## Version 3 Changes

Converted this repository to a monorepo with the following packages:
- @hpcc-js/wasm-base91
- @hpcc-js/wasm-duckdb
- @hpcc-js/wasm-expat
- @hpcc-js/wasm-graphviz
- @hpcc-js/wasm-graphviz-cli
- @hpcc-js/wasm-zstd
- @hpcc-js/wasm (meta package for backward compatibility)

## Quick Start

```ts
import { Base91, Graphviz, Zstd } from "@hpcc-js/wasm";
import { Base91 } from "@hpcc-js/wasm-base91";
import { Graphviz } from "@hpcc-js/wasm-graphviz";
import { Zstd } from "@hpcc-js/wasm-zstd";

// Graphviz ---
async function dot2svg() {
Expand Down Expand Up @@ -98,3 +111,18 @@ Notes:
* wasmFolder is no longer needed
* All wasm libraries have the same asynchronous load pattern
- `const instance = await <Wasm>.load();`

v3.x.x
```ts
import { Graphviz } from "@hpcc-js/wasm-graphviz";

const dot = "digraph G { Hello -> World }";

Graphviz.load().then(graphviz => {
const svg = graphviz.dot(dot);
const div = document.getElementById("placeholder");
div.innerHTML = svg;

console.log(graphviz.version());
});
```
73 changes: 27 additions & 46 deletions package-lock.json

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

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"git-push": "git push --follow-tags upstream trunk",
"serve-docs": "vitepress serve docs",
"serve": "ws",
"lint-skypack": "lerna run lint-skypack",
"lint": "lerna run lint",
"lint-fix": "npm run lint -- --fix",
"test-node": "lerna run test-node",
Expand All @@ -66,8 +67,10 @@
"tag": "run-s standard-version git-push",
"tag-next": "run-s standard-version-next git-push",
"purge-jsdelivr": "node ./utils/purge-jsdelivr.js",
"update": "npx -y npm-check-updates -u -t minor",
"update-major": "npx -y npm-check-updates -u"
"update-root": "npx -y npm-check-updates -u -t minor",
"update": "npm run update-root && lerna run update",
"update-major-root": "npx -y npm-check-updates -u",
"update-major": "npm run update-major-root && lerna run update-major"
},
"dependencies": {},
"devDependencies": {
Expand Down Expand Up @@ -102,7 +105,7 @@
"run-script-os": "1.1.6",
"tslib": "2.6.3",
"typedoc": "0.26.5",
"typedoc-plugin-markdown": "4.2.3",
"typedoc-plugin-markdown": "4.2.4",
"typescript": "5.5.4",
"typescript-eslint": "8.1.0",
"vitepress": "1.3.2"
Expand Down
Loading

0 comments on commit fccd582

Please sign in to comment.