forked from IceWhaleTech/CasaOS-AppStore
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 2.13 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
name: release
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: remove all screenshots
run: find . -name "screenshot*" | xargs rm -f
- name: remove all thumbnails
run: find . -name "thumbnail*" | xargs rm -f
- name: remove all icon
run: find . -name "icon.png" | xargs rm -f
- name: remove all app file
run: find . -name "appfile.json" | xargs rm -f
- name: create a build with sysroot
id: build
run: |
rm -rf /tmp/build
mkdir -p /tmp/build/sysroot/var/lib/casaos/appstore/default.new
cp -rv build/* /tmp/build/
cp -rv Apps /tmp/build/sysroot/var/lib/casaos/appstore/default.new/
cp -v category-list.json /tmp/build/sysroot/var/lib/casaos/appstore/default.new/
cp -v recommend-list.json /tmp/build/sysroot/var/lib/casaos/appstore/default.new/
cp -v README.md /tmp/build/sysroot/var/lib/casaos/appstore/default.new/
pushd /tmp
tar zcvf linux-all-appstore-${{ github.ref_name }}.tar.gz build
- uses: softprops/action-gh-release@v1
if: steps.build.outcome == 'success'
with:
files: /tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz
draft: true
prerelease: true
fail_on_unmatched_files: true
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Upload to oss
id: upload_to_oss
uses: tvrcgo/upload-to-oss@master
with:
key-id: ${{ secrets.OSS_KEY_ID }}
key-secret: ${{ secrets.OSS_KEY_SECRET }}
region: oss-cn-shanghai
bucket: casaos
assets: |
/tmp/checksums.txt:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/checksums.txt
/tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-all-appstore-${{ github.ref_name }}.tar.gz