Skip to content

Commit b632333

Browse files
committed
feat(cd): build and attach plugin binary to dev github release
1 parent b1c80fc commit b632333

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Diff for: .github/workflows/cd.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CD
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- src/**
8+
- package.json
9+
- tsconfig.json
10+
- webpack.config.js
11+
- .github/workflows/cd.yml
12+
workflow_dispatch:
13+
jobs:
14+
dev-release:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-node@v1
22+
- name: Install dependencies
23+
run: npm install
24+
- name: Build plugin
25+
run: npm run dist
26+
- name: Remove existing artifacts
27+
uses: andreaswilli/[email protected]
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
tag: dev
31+
- name: Calculate short SHA
32+
shell: bash
33+
run: echo "GITHUB_SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
34+
- name: Upload binary to release
35+
uses: svenstaro/upload-release-action@v2
36+
with:
37+
repo_token: ${{ secrets.GITHUB_TOKEN }}
38+
file: publish/joplin.plugin.templates.jpl
39+
asset_name: joplin.plugin.templates.dev-${{ env.GITHUB_SHORT_SHA }}.jpl
40+
tag: dev

0 commit comments

Comments
 (0)