generated from ludeeus/integration_blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.71 KB
/
release.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
50
name: Create release
run-name: Create ${{ inputs.pre_release && 'pre-release' || 'release' }} by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
pre_release:
type: boolean
description: "pre-release?"
required: true
jobs:
release:
runs-on: "ubuntu-latest"
steps:
- name: Checkout repository
id: checkout
uses: "actions/checkout@v4"
- name: Changelog action
id: changelog
uses: TriPSs/conventional-changelog-action@v6
with:
github-token: ${{ secrets.github_token }}
preset: conventionalcommits
version-file: "custom_components/saleryd_hrv/manifest.json"
pre-release: ${{ inputs.pre_release }}
skip-ci: false
- name: "ZIP the integration directory"
id: zip_release
if: ${{ steps.changelog.outputs.skipped == 'false' }}
shell: "bash"
run: |
mkdir "${{ github.workspace }}/dist"
cd "${{ github.workspace }}/custom_components"
zip "${{ github.workspace }}/dist/saleryd_hrv_${{ steps.changelog.outputs.tag }}.zip" -r ./saleryd_hrv
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
allowUpdates: true
token: ${{ secrets.github_token }}
commit: ${{ github.sha }}
tag: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
name: ${{ steps.changelog.outputs.tag }}
prerelease: ${{ inputs.pre_release }}
artifacts: "${{ github.workspace }}/dist/saleryd_hrv_${{ steps.changelog.outputs.tag }}.zip"