-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.66 KB
/
build.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
53
54
55
56
57
58
59
60
61
name: Build and Release Trophies Plugin
on:
push:
tags:
- 'v*'
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '18.3'
- name: Install Dependencies
run: npm install
- name: build
run: npm run build
- name: copy files into build
run: |
cp plugin.json ./dist/
mkdir ./dist/dist
mv ./dist/index.js ./dist/dist/
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: decky-trophies
path: |
./dist/*
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: decky-trophies
path: decky-trophies
- name: zip/tar release
run: |
zip -r decky-trophies.zip decky-trophies/*
tar -czvf decky-trophies.tar.gz decky-trophies
- name: Create a release
uses: ncipollo/release-action@v1
with:
artifacts: 'decky-trophies.zip,decky-trophies.tar.gz'
allowUpdates: true