test #31740
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When we push commits, fire off a `weave-package-updated` | |
# repository dispatch event to wandb/core | |
name: Notify wandb/core | |
on: | |
push: | |
branches: | |
- "**" | |
workflow_dispatch: | |
permissions: | |
packages: write | |
jobs: | |
publish-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure npm for GitHub Packages | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> weave-js/.npmrc | |
- name: Publish package | |
run: | | |
cd weave-js | |
yarn install --frozen-lockfile | |
npm version 0.0.0-${{ github.sha }} --no-git-tag-version | |
yarn generate | |
cp package.json README.md .npmrc src/ | |
cd src | |
# E409 means the package already exists, in which case we don't want to fail this job | |
if [ "${{ github.ref }}" = "refs/heads/master" ]; then | |
npm publish 2>&1 | tee publish_output.log || grep -q "E409" publish_output.log | |
else | |
npm publish --tag prerelease 2>&1 | tee publish_output.log || grep -q "E409" publish_output.log | |
fi | |
check-which-tests-to-run: | |
uses: ./.github/workflows/check-which-tests-to-run.yaml | |
notify-wandb-core: | |
needs: [check-which-tests-to-run, publish-package] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository dispatch | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.WANDB_CORE_ACCESS_TOKEN }} | |
repository: wandb/core | |
event-type: weave-package-updated | |
client-payload: '{"ref_name": "${{ github.ref_name }}", "sha": "${{ github.sha }}", "run_weave_js_tests": ${{ needs.check-which-tests-to-run.outputs.weave_js_tests }}, "run_weave_query_tests": ${{ needs.check-which-tests-to-run.outputs.weave_query_tests }}, "run_trace_server_tests": ${{ needs.check-which-tests-to-run.outputs.trace_server_tests }}}' |