This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 60
117 lines (117 loc) · 5.81 KB
/
deploy.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Deployer
on:
repository_dispatch:
push:
branches:
- master
jobs:
nightly:
name: Nightly Build
runs-on: ubuntu-latest
if: "github.event_name == 'push' && !contains(github.event.head_commit.message, '[REL]')"
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- name: Gather Information
id: info
run: |
echo "::set-output name=timestamp::$(date +%s)"
echo "::set-output name=productName::$(node -p -e "require('./package.json').productName")"
echo "::set-output name=version::$(node -p -e "require('./package.json').version")"
- name: 📌 | Install Dependencies
run: |
yarn install
yarn run dist
- name: 📦 | Building
run: yarn run build
- name: 📦 | Build AppImage
run: |
jq -c '.productName = "PreMiD Portable"' ./dist/app/package.json > tmp.$$.json && mv tmp.$$.json ./dist/app/package.json
yarn run build:n-appimage
- name: 🏷️ | Create Release
uses: softprops/action-gh-release@v1
with:
files: |
./dist/app/dist/${{ steps.info.outputs.productName }}.tar.gz
./dist/app/dist/${{ steps.info.outputs.productName }} Portable.AppImage
tag_name: v${{ steps.info.outputs.version }}-${{ steps.info.outputs.timestamp }}
name: Nightly v${{ steps.info.outputs.version }}-${{ steps.info.outputs.timestamp }}
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
stable:
name: Stable Build
runs-on: ubuntu-latest
if: "github.event_name == 'push' && contains(github.event.head_commit.message, '[REL]')"
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- name: Gather Information
id: info
run: |
echo "::set-output name=productName::$(node -p -e "require('./package.json').productName")"
echo "::set-output name=version::$(node -p -e "require('./package.json').version")"
- name: 📌 | Install Dependencies
run: |
yarn install
yarn run dist
- name: 📦 | Building
run: yarn run build
- name: 🏷️ | Create Release
uses: softprops/action-gh-release@v1
with:
files: |
./dist/app/dist/${{ steps.info.outputs.productName }}.tar.gz
tag_name: v${{ steps.info.outputs.version }}
name: Stable v${{ steps.info.outputs.version }}
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
- name: Install packagecloud.io CLI
run: |
gem install package_cloud
- name: 📦 | Upload Debian packages
run: |
package_cloud push PreMiD/Linux/debian/wheezy ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/jessie ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/stretch ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/buster ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/bullseye ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/bookworm ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/debian/trixie ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
- name: ⚡️ | Upload Ubuntu packages
run: |
package_cloud push PreMiD/Linux/ubuntu/xenial ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/yakkety ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/bionic ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/cosmic ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/disco ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/focal ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/groovy ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/hirsute ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
package_cloud push PreMiD/Linux/ubuntu/impish ./dist/app/dist/${{ steps.info.outputs.productName }}.deb
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
- name: ⚡️ | Upload RPM packages
run: |
package_cloud push PreMiD/Linux/el/5 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm
package_cloud push PreMiD/Linux/el/6 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm
package_cloud push PreMiD/Linux/el/7 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm
package_cloud push PreMiD/Linux/el/8 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm
package_cloud push PreMiD/Linux/fedora/32 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
- name: ⚡️ | Upload AppImage to Draft release
run: |
jq -c '.productName = "PreMiD Portable"' ./dist/app/package.json > tmp.$$.json && mv tmp.$$.json ./dist/app/package.json
yarn run build:appimage
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}