-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (49 loc) · 1.69 KB
/
package.yml
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
name: Package
on:
pull_request:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0 # fetch the whole repo history
- name: Determine version
if: ${{github.event_name == 'pull_request'}}
id: version
uses: codacy/git-version@2.8.0
# This can switch back to https://github.com/marketplace/actions/set-json-field
# when https://github.com/jossef/action-set-json-field/pull/13 is merged.
- name: Write version
uses: Tritolium/action-set-json-field@bd088679104b89fe94a2c90ae1ca21577af44bdd
with:
file: src/streamdeck.json
field: version
value: ${{github.event.release.name || steps.version.outputs.version}}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Package
run: npm run package
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: com.mediabounds.streamdeck.jira-${{github.event.release.name || steps.version.outputs.version}}.streamDeckPlugin
path: release/com.mediabounds.streamdeck.jira.streamDeckPlugin
if-no-files-found: error
- name: Publish
if: ${{github.event_name == 'release'}}
uses: softprops/action-gh-release@v2
with:
files: release/com.mediabounds.streamdeck.jira.streamDeckPlugin