Repository navigation
65 lines (53 loc) · 1.52 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (53 loc) · 1.52 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
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
npm-publish:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"
cache: npm
- run: npm ci
- name: Publish to npm
if: ${{ env.NODE_AUTH_TOKEN != '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
github-release:
name: Create GitHub Release with assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install and build
run: |
npm ci
npm run build
- name: Package plugin tarball (npm pack)
run: npm pack --pack-destination dist/
- name: Build a "bundle" zip for direct-path installs
run: |
mkdir -p bundle
cp -r dist bundle/dist
mkdir -p bundle/examples
cp -r patch bundle/patch
cp examples/opencode.json bundle/examples/
cp package.json LICENSE README.md README.en.md README.ar.md bundle/
(cd bundle && zip -r ../opencode-rtl-fix-bundle.zip .)
- uses: softprops/action-gh-release@v2
with:
name: opencode-rtl-fix ${{ github.ref_name }}
files: |
dist/*.tgz
opencode-rtl-fix-bundle.zip