-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.18 KB
/
publish.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
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: CC0-1.0
name: Zip and Publish Template
on:
release:
types:
- created
jobs:
publish-zip:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Update Template Properties
run: |
sed -i "1s|.*|name=Capella2Polarion Template Version ${{ github.ref_name }}|" template/template.properties
sed -i "2s|.*|description=Template for Capella2Polarion Sync-Projects in Polarion, $(date '+%d.%m.%Y')|" template/template.properties
- name: Zip Template Folder
run: |
mkdir ${{ vars.TEMPLATE_FILENAME }} && cp -r template/. ${{ vars.TEMPLATE_FILENAME }}
zip -r ${{ vars.TEMPLATE_FILENAME }}.zip ${{ vars.TEMPLATE_FILENAME }}
- name: Attach ZIP file to release
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ vars.TEMPLATE_FILENAME }}.zip
asset_name: ${{ vars.TEMPLATE_FILENAME }}.zip
asset_content_type: application/zip