Skip to content

Commit fe5d225

Browse files
authored
Merge pull request #2 from db-ui/ci-release-action
Add workflow for releases
2 parents a3550f6 + 81e826f commit fe5d225

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release themes as archives
2+
3+
on:
4+
push:
5+
# Runs on semver-tagged releases
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
zip_themes:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
# List of theme directories that shall be included
15+
directory: [siteTheme-Bahn-ng]
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
- name: Zip the theme directory
20+
run: |
21+
cd ${{ matrix.directory }} && zip -r ../${{ matrix.directory }}-${{ github.ref_name }}.zip .
22+
- name: Upload zip as artifact
23+
uses: actions/upload-artifact@v3
24+
with:
25+
name: ${{ matrix.directory }}
26+
path: ${{ matrix.directory }}-${{ github.ref_name }}.zip
27+
retention-days: 1
28+
29+
make_release:
30+
runs-on: ubuntu-latest
31+
needs: zip_themes
32+
steps:
33+
- name: Download artifacts
34+
uses: actions/download-artifact@v3
35+
with:
36+
path: artifacts
37+
- name: Create GitHub draft release with the zipped themes as assets
38+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
39+
with:
40+
# Note: uses default github workflow token which needs write access configured
41+
files: artifacts/*/*
42+
draft: true

0 commit comments

Comments
 (0)