FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sim/.github/workflows/publish-cli.yml at main · simstudioai/sim · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
simstudioai
/
sim
Public
Notifications
You must be signed in to change notification settings
Fork
3.8k
Star
29.5k
Code
Issues
119
Pull requests
179
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sim
/
.github
/
workflows
/
publish-cli.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
73 lines (61 loc) · 2.3 KB
Breadcrumbs
sim
/
.github
/
workflows
/
publish-cli.yml
Copy path
File metadata and controls
73 lines (61 loc) · 2.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
:
Publish CLI Package
on
:
push
:
branches
:
[main]
paths
:
-
'
packages/cli/**
'
permissions
:
contents
:
read
jobs
:
publish-npm
:
runs-on
:
${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes
:
15
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
#
v6
-
name
:
Setup Bun
uses
:
oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
#
v2
with
:
bun-version
:
1.3.14
-
name
:
Setup Node.js for npm publishing
uses
:
actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
#
v6
with
:
node-version
:
'
22
'
registry-url
:
'
https://registry.npmjs.org/
'
-
name
:
Cache Bun dependencies
uses
:
actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
#
v5
with
:
path
:
|
~/.bun/install/cache
node_modules
**/node_modules
key
:
${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys
:
|
${{ runner.os }}-bun-
-
name
:
Install dependencies
working-directory
:
packages/cli
run
:
bun install --frozen-lockfile --ignore-scripts
-
name
:
Build package
working-directory
:
packages/cli
run
:
bun run build
-
name
:
Get package version
id
:
package_version
working-directory
:
packages/cli
run
:
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
-
name
:
Check if version already exists
id
:
version_check
run
:
|
if npm view simstudio@${{ steps.package_version.outputs.version }} version &> /dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
-
name
:
Publish to npm
if
:
steps.version_check.outputs.exists == 'false'
working-directory
:
packages/cli
run
:
npm publish --access=public
env
:
NODE_AUTH_TOKEN
:
${{ secrets.NPM_TOKEN }}
-
name
:
Log skipped publish
if
:
steps.version_check.outputs.exists == 'true'
run
:
echo "Skipped publishing because version ${{ steps.package_version.outputs.version }} already exists on npm"
Back
|
FazBrowse Home
|
New Git URL