test publish #6
This file contains 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
name: test publish | |
on: | |
workflow_dispatch: | |
inputs: | |
run_url: | |
description: "github actions run to pull artifacts from" | |
default: "https://github.com/finos/perspective/actions/runs/11615534995" | |
required: true | |
tag: | |
description: "git tag to use (on tomjakubowski/perspective)" | |
default: "v3.1.test8" | |
required: true | |
jobs: | |
publish: | |
# needs: | |
# [ | |
# build_and_test_jupyterlab, | |
# test_python, | |
# test_js, | |
# benchmark_js, | |
# benchmark_python, | |
# build_emscripten_wheel, | |
# build_and_test_rust, | |
# lint_and_docs, | |
# ] | |
# if: startsWith(github.ref, 'refs/tags/v') | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
environment: urdrome | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Parse run URL | |
id: parse_url | |
run: | | |
URL="${{ inputs.run_url }}" | |
if [[ "$URL" =~ ^https://github\.com/.+/actions/runs/[0-9]+$ ]]; then | |
REPO=$(echo "$URL" | sed -E 's|https://github\.com/([^/]+/[^/]+)/actions/runs/[0-9]+|\1|') | |
RUN_ID=$(echo "$URL" | sed -E 's|.*/runs/([0-9]+)|\1|') | |
echo "repo=$REPO" >> $GITHUB_OUTPUT | |
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT | |
else | |
echo "Could not parse run URL: $URL" | |
exit 1 | |
fi | |
- uses: actions/checkout@v4 | |
with: | |
repository: tomjakubowski/perspective | |
ref: ${{ inputs.tag }} | |
- name: Config | |
id: config-step | |
uses: tomjakubowski/perspective/.github/actions/config@master | |
- name: Initialize Build | |
uses: tomjakubowski/perspective/.github/actions/install-deps@master | |
with: | |
rust: "false" | |
cpp: "false" | |
python: "false" | |
javascript: "false" | |
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: perspective-js-dist | |
path: . | |
github-token: ${{ secrets.GH_TOKEN }} | |
repository: ${{ steps.parse_url.outputs.repo }} | |
run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-dist-aarch64-macos-13-3.9 | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-dist-x86_64-macos-13-3.9 | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-dist-x86_64-windows-2022-3.9 | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-dist-x86_64-ubuntu-22.04-3.9 | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-dist-wasm32-emscripten-3.9 | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-sdist | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-js-benchmarks | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-python-benchmarks | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: perspective-rust | |
# github-token: ${{ secrets.GH_TOKEN }} | |
# repository: ${{ steps.parse_url.outputs.repo }} | |
# run-id: ${{ steps.parse_url.outputs.run_id }} | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./rust/perspective-js | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./rust/perspective-viewer | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-viewer-datagrid | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-viewer-d3fc | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-viewer-openlayers | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-workspace | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-cli | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-webpack-plugin | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-esbuild-plugin | |
- run: pnpm pack --pack-destination=../.. | |
working-directory: ./packages/perspective-jupyterlab | |
- name: set up npmrc to publish to github | |
run: | | |
cat >> $HOME/.npmrc <<EOF | |
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} | |
@finos:registry=https://npm.pkg.github.com | |
always-auth=true | |
EOF | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: publish to github npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
*.whl | |
*.tar.gz | |
*.tgz | |
*.arrow | |
*.crate | |
# XXX(tom): this should use the parsed repo probably? idk | |
repository: tomjakubowski/perspective | |
tag_name: ${{ inputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOM_PERSPECTIVE_PUSH_TOKEN_DANGER_DANGER }} |