-
-
Notifications
You must be signed in to change notification settings - Fork 30
57 lines (50 loc) · 1.39 KB
/
package.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
# SPDX-FileCopyrightText: 2022 Sefa Eyeoglu <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Package themes
on:
push:
branches:
- main
paths:
- "themes/**"
- "icons/**"
- "cats/**"
pull_request:
branches:
- main
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y parallel zip
- name: Package
run: |
mkdir -p out
parallel "zip -r out/{/}-theme.zip {}/" ::: themes/*
parallel "zip -r out/{/}-icons.zip {}/" ::: icons/*
parallel "zip -r out/{/}-catpack.zip {}/" ::: cats/*
echo "DISPLAY_NAME=$(date "+%Y-%m-%d %H:%M:%S")" >> "$GITHUB_ENV"
echo "TAG_NAME=$(date "+%Y-%m-%d_%s")" >> "$GITHUB_ENV"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: themes
path: out/*.zip
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'push' }}
with:
name: ${{ env.DISPLAY_NAME }}
tag_name: ${{ env.TAG_NAME }}
draft: false
prerelease: false
files: |
out/*.zip