-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (82 loc) · 2.63 KB
/
release.yaml
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
name: release
on:
schedule:
- cron: '42 0 * * 1'
push:
branches:
- main
workflow_dispatch:
env:
PYTHONUNBUFFERED: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
IDENTITY: [ emojisearch, iconsearch, logosearch, supertinyicons ]
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sh unidecode pyaml
- name: Configure git
run: |
git config --global init.defaultBranch main
- name: Build index for github repos
run: ./bin/build-index.sh ${{ matrix.IDENTITY }} github
- name: Build index for gitlab repos
if: ${{ matrix.IDENTITY != 'supertinyicons' && matrix.IDENTITY != 'emojisearch' }}
run: ./bin/build-index.sh ${{ matrix.IDENTITY }} gitlab
- name: Build download file
if: ${{ matrix.IDENTITY != 'supertinyicons' }}
run: ./bin/build-download.sh ${{ matrix.IDENTITY }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
if-no-files-found: ignore
name: release-artifacts
path: |
build/download-${{ matrix.IDENTITY }}.tgz
build/index-${{ matrix.IDENTITY }}-github.tgz
build/index-${{ matrix.IDENTITY }}-gitlab.tgz
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: release-artifacts
- name: List downloaded files
run: ls -R
- name: Set release info
run: |
echo "RELEASE_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
echo "RELEASE_TAG=$(date -u +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
download-emojisearch.tgz
download-iconsearch.tgz
download-logosearch.tgz
index-emojisearch-github.tgz
index-iconsearch-github.tgz
index-iconsearch-gitlab.tgz
index-logosearch-github.tgz
index-logosearch-gitlab.tgz
index-supertinyicons-github.tgz
tag_name: ${{ env.RELEASE_TAG }}
name: Release ${{ env.RELEASE_DATE }}
body: |
Automatically created on ${{ env.RELEASE_DATE }}
draft: false
prerelease: false