From 348501d464a97586fc01e5fbbb967e0a60104ea7 Mon Sep 17 00:00:00 2001 From: Harry Roberts Date: Thu, 21 Aug 2025 21:01:59 +0100 Subject: [PATCH 1/2] First draft release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I haven’t done this before… let’s see how I get on. --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b86fecd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: release + +on: + push: + tags: + - '*.*.*' + - '*.*.*-*' + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install deps + run: npm ci + + - name: Build obs.min.js + run: npm run build + + - name: SHA256 checksum + run: shasum -a 256 obs.min.js > SHA256SUMS.txt + + - name: Create GitHub Release and upload assets + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + name: 'Obs.js ${{ github.ref_name }}' + generate_release_notes: true + files: | + obs.min.js + SHA256SUMS.txt + From b8d2af5be8124ada0e4ab0e24f7d8a9dba370ae8 Mon Sep 17 00:00:00 2001 From: Harry Roberts Date: Thu, 21 Aug 2025 21:02:25 +0100 Subject: [PATCH 2/2] Provide copy/paste snippet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code CANNOT be deployed any other way than immediately in the ``, so I don’t really need to provide anything over than the minified snippet. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 0c5249a..4ff1045 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,16 @@ This means you could do something like this: Obs.js **MUST** be placed in an inline ` +``` + ### Listen for Changes If you have long-lived pages or a single-page app, you can instruct Obs.js to