-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (62 loc) · 1.71 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
pull_request:
push:
branches: master
jobs:
build:
name: Build plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
if: ${{ !env.ACT }}
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
- name: Download Decky CLI
run: |
mkdir /tmp/decky-cli
curl -L -o /tmp/decky-cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/download/0.0.1-alpha.12/decky"
chmod +x /tmp/decky-cli/decky
echo "/tmp/decky-cli" >> $GITHUB_PATH
- name: Build plugins
run: |
echo "::group::Building plugin MicroSDeck"
# Run the CLI as root to get around Docker's weird permissions
sudo $(which decky) plugin build -b -o /tmp/output -s directory .
sudo chown -R $(whoami) .
echo "::endgroup::"
- name: Unzip Result
run: |
mkdir release && cd release
unzip /tmp/output/MicroSDeck.zip
- name: Upload Artifacts to Github
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
with:
name: "MicroSDeck"
path: release/MicroSDeck/*
deploy:
if: github.ref == 'refs/heads/master'
needs: build
name: Deploy Package
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
if: ${{ !env.ACT }}
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
- run: pnpm install
- run: pnpm build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}