This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
forked from aarron-lee/SimpleDeckyTDP
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.7 KB
/
release.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
name: Release
permissions:
contents: write
on:
workflow_dispatch:
push:
branches:
- "main"
tags:
- "v*.*.*"
jobs:
build_plugin:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: set git global safe directory
run: |
pacman -Syu git npm --noconfirm
git config --global --add safe.directory $(realpath .)
- uses: actions/checkout@v3
- name: build plugin
run: |
npm i -g [email protected]
pnpm install --no-frozen-lockfile
pnpm run build
tar -czvf SimpleDeckyTDP.tar.gz --transform 's,^,SimpleDeckyTDP/,' dist py_modules ota_update.sh *.py *.json *.md *.js LICENSE
continue-on-error: true
- name: show files
run: |
tar -tzvf SimpleDeckyTDP.tar.gz
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: SimpleDeckyTDP
path: SimpleDeckyTDP.tar.gz
publish:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build_plugin
steps:
- run: mkdir /tmp/artifacts
- name: download artifact
uses: actions/download-artifact@v3
with:
repository: SteamFork/SimpleDeckyTDP
path: /tmp/artifacts
- run: ls -R /tmp/artifacts
- name: publish to github release
uses: softprops/action-gh-release@v1
with:
files: /tmp/artifacts/SimpleDeckyTDP/SimpleDeckyTDP.tar.gz
tag_name: ${{ github.ref_name }}
body: |
SimpleDeckyTDP
draft: true
prerelease: contains(github.ref, 'pre')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}