Skip to content

Commit

Permalink
Merge pull request #2 from db-ui/ci-release-action
Browse files Browse the repository at this point in the history
Add workflow for releases
  • Loading branch information
mxmehl authored Jul 28, 2023
2 parents a3550f6 + 81e826f commit fe5d225
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release themes as archives

on:
push:
# Runs on semver-tagged releases
tags:
- "v*.*.*"

jobs:
zip_themes:
runs-on: ubuntu-latest
strategy:
matrix:
# List of theme directories that shall be included
directory: [siteTheme-Bahn-ng]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Zip the theme directory
run: |
cd ${{ matrix.directory }} && zip -r ../${{ matrix.directory }}-${{ github.ref_name }}.zip .
- name: Upload zip as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.directory }}
path: ${{ matrix.directory }}-${{ github.ref_name }}.zip
retention-days: 1

make_release:
runs-on: ubuntu-latest
needs: zip_themes
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Create GitHub draft release with the zipped themes as assets
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
# Note: uses default github workflow token which needs write access configured
files: artifacts/*/*
draft: true

0 comments on commit fe5d225

Please sign in to comment.