-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.4 KB
/
Copy pathpublish-installer.yaml
File metadata and controls
57 lines (48 loc) · 1.4 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
name: Publish Installer to NPM
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 0.0.2)'
required: true
type: string
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: bun install
- name: Update version
run: |
cd packages/installer
npm version ${{ github.event.inputs.version }} --no-git-tag-version
- name: Build installer
run: |
cd packages/installer
bun run build
- name: Publish to NPM
run: |
cd packages/installer
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit version bump
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add packages/installer/package.json
git commit -m "chore: bump installer version to ${{ github.event.inputs.version }}"
git push