-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (46 loc) · 1.4 KB
/
build.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
---
name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: sudo apt-get update -y && sudo apt-get install -y inkscape
- run: inkscape --export-png=zarr-gradient.png zarr-gradient.svg
- env:
FILES: zarr-pink-horizontal zarr-pink-stacked
run: |
for file in $FILES; do
inkscape --export-background-opacity=0 --export-png=${file}-transparent.png ${file}.svg
inkscape --export-background="#ffffff" --export-png=${file}-white.png ${file}.svg
inkscape --export-background="#000000" --export-png=${file}-black.png ${file}.svg
done
- name: Upload artwork as artifact
uses: actions/upload-artifact@v2
with:
name: zarr-logo-pngs
path: "*.png"
release:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Download artwork artifact
uses: actions/download-artifact@v2
with:
name: zarr-logo-pngs
path: .
- name: Upload website as release asset
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
tagname="${GITHUB_REF#refs/tags/}"
gh release create "$tagname" *.png