From 17515ebf9444558ee11784b6ba2c8543858452ef Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 27 Nov 2024 11:14:04 +0100 Subject: [PATCH] Moved NPM publishing to manual workflow --- .github/workflows/ci.yml | 27 +++------------------------ .github/workflows/releng.yml | 24 +++++++++++------------- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61bd31f86..619d2e6dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -96,8 +94,6 @@ jobs: uses: Swatinem/rust-cache@v2.7.3 - name: Run tests - # FIXME: remove if after testing - if: false run: | cd crates/wasm-test-runner ./run.sh @@ -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 diff --git a/.github/workflows/releng.yml b/.github/workflows/releng.yml index 63007af7c..312bc5db2 100644 --- a/.github/workflows/releng.yml +++ b/.github/workflows/releng.yml @@ -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 \ No newline at end of file + cd tlsn-wasm-pkg + npm publish \ No newline at end of file