Skip to content

Create pre-release by @bj00rn #54

Create pre-release by @bj00rn

Create pre-release by @bj00rn #54

Workflow file for this run

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"