-
Notifications
You must be signed in to change notification settings - Fork 45
78 lines (77 loc) · 3.22 KB
/
standalone.generated.yml
File metadata and controls
78 lines (77 loc) · 3.22 KB
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
74
75
76
77
78
# Do not modify!
# This file was generated by https://github.com/JLarky/gha-ts
name: "Release: Step 2 - Standalone"
"on":
workflow_call:
inputs:
release_version:
required: true
type: string
description: Resolved release version
release_commit:
required: true
type: string
description: Release commit persisted to the repository
release_tag:
required: true
type: string
description: Resolved release tag
concurrency:
group: "publish-npm-${{ github.run_id }}"
cancel-in-progress: false
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check npm publish status
id: npm_status
shell: bash
env:
RELEASE_VERSION: "${{ inputs.release_version }}"
run: "published_version=$(npm view \"polywise@${RELEASE_VERSION}\" version 2>/dev/null || true)\nif [ \"$published_version\" = \"$RELEASE_VERSION\" ]; then\n\techo \"already_published=true\" >> \"$GITHUB_OUTPUT\"\n\texit 0\nfi\necho \"already_published=false\" >> \"$GITHUB_OUTPUT\""
- if: "steps.npm_status.outputs.already_published != 'true'"
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: build
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Pin build branch to release commit
shell: bash
run: "git checkout --detach \"${{ inputs.release_commit }}\""
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 11.5.1
run_install: false
- if: "steps.npm_status.outputs.already_published != 'true'"
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Setup Bun
uses: oven-sh/setup-bun@v2
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Install dependencies
shell: bash
run: "printf '\\ntrustLockfile: true\\n' >> pnpm-workspace.yaml\npnpm install --frozen-lockfile"
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Upgrade npm
run: npm install -g npm@latest
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Build standalone package
shell: bash
run: "pnpm --filter \"./packages/stk\" run build\npnpm --filter \"./packages/erpc\" run build\npnpm --filter \"./packages/app\" run build:standalone\npnpm --dir packages/polywise run build:standalone"
- if: "steps.npm_status.outputs.already_published != 'true'"
name: Publish polywise
shell: bash
working-directory: packages/polywise
env:
RELEASE_VERSION: "${{ inputs.release_version }}"
run: "publish_userconfig=$(mktemp)\nprintf \"registry=https://registry.npmjs.org/\\n\" > \"$publish_userconfig\"\nexport NPM_CONFIG_USERCONFIG=\"$publish_userconfig\"\nunset NODE_AUTH_TOKEN\npnpm publish --access public --provenance --no-git-checks"