Skip to content

Commit

Permalink
Moved NPM publishing to manual workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Nov 27, 2024
1 parent 38a4e9c commit 17515eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 37 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ jobs:
components: rust-src

- name: Install chromedriver
# FIXME: remove if after testing
if: false
run: |
sudo apt-get update
sudo apt-get install -y chromium-chromedriver
Expand All @@ -96,8 +94,6 @@ jobs:
uses: Swatinem/[email protected]

- name: Run tests
# FIXME: remove if after testing
if: false
run: |
cd crates/wasm-test-runner
./run.sh
Expand All @@ -107,36 +103,19 @@ jobs:
cd crates/wasm
./build.sh
- name: Dry Run NPM Publish for tlsn-wasm
- name: Dry Run NPM Publish
run: |
cd crates/wasm/pkg
npm publish --dry-run
- name: Save tlsn-wasm package for tagged builds
# if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
# name: ${{ github.ref_name }}-tlsn-wasm-pkg
name: ${{ github.sha }}-tlsn-wasm-pkg
name: ${{ github.ref_name }}-tlsn-wasm-pkg
path: ./crates/wasm/pkg
if-no-files-found: error

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
# FIXME: fix name after testing
# name: ${{ github.ref_name }}-tlsn-wasm-pkg
name: ${{ github.sha }}-tlsn-wasm-pkg
path: tlsn-wasm-pkg

- name: NPM Publish for tlsn-wasm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# FIXME: remove dry-run after testing
run: |
cd tlsn-wasm-pkg
npm publish --dry-run
tests-integration:
name: Run tests release build
runs-on: ubuntu-latest
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/releng.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: Release
name: Publish tlsn-wasm to NPM

on:
workflow_run:
workflows: ["ci"]
types:
- completed
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish to NPM'
required: true
default: '0.1.0-alpha.8-pre'

jobs:
release:
# FIXME: commented for testing in a PR
# if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
# FIXME: fix name after testing
# name: ${{ github.ref_name }}-tlsn-wasm-pkg
name: ${{ github.sha }}-tlsn-wasm-pkg
name: ${{ github.event.inputs.tag }}-tlsn-wasm-pkg
path: tlsn-wasm-pkg

- name: NPM Publish for tlsn-wasm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# FIXME: remove dry-run after testing
run: |
cd pkg
npm publish --dry-run
cd tlsn-wasm-pkg
npm publish

0 comments on commit 17515eb

Please sign in to comment.