forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 1.82 KB
/
reusable_publish_js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and publish JS
on:
workflow_call:
inputs:
concurrency:
type: string
required: true
release-commit:
description: "Commit to release"
type: string
required: true
concurrency:
group: ${{ inputs.concurrency }}-publish-js
cancel-in-progress: true
permissions:
contents: "write"
id-token: "write"
jobs:
get-commit-sha:
name: Get Commit Sha
runs-on: ubuntu-latest
outputs:
short-sha: ${{ steps.get-short-sha.outputs.short-sha }}
full-sha: ${{ steps.get-full-sha.outputs.full-sha }}
steps:
- name: "Set short-sha"
id: get-short-sha
shell: bash
run: echo "short-sha=$(echo ${{ inputs.release-commit }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: "Set full-sha"
id: get-full-sha
shell: bash
run: echo "full-sha=${{ inputs.release-commit }}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest-16-cores
needs: [get-commit-sha]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.release-commit }}
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install Yarn
run: npm install -g yarn
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
cache_key: "build-web"
save_cache: false
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.0
- name: Publish packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: |
pixi run node rerun_js/scripts/publish.mjs