Skip to content

Commit 943ef3c

Browse files
committed
ci(github-actions): add release publish github action
1 parent ad11519 commit 943ef3c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
paths-ignore:
8+
- .github/workflows/*
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '23.10.0'
20+
- name: get version
21+
id: version
22+
uses: notiz-dev/github-action-json-property@release
23+
with:
24+
path: 'plugin.json'
25+
prop_path: 'Version'
26+
- run: echo ${{steps.version.outputs.prop}}
27+
- name: Install dependencies
28+
run: npm install
29+
- name: Build
30+
run: |
31+
npm run build
32+
npm prune --omit=dev
33+
- name: Package
34+
run: zip -r Flow.Launcher.Plugin.Formatter.zip . -x '*.git*' -x 'src/*' -x 'README.md' -x 'tsconfig.json' -x '.prettierrc'
35+
- name: Publish
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: 'Flow.Launcher.Plugin.Formatter.zip'
39+
tag_name: 'v${{steps.version.outputs.prop}}'
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)