Release #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
on: | |
push: | |
branches: | |
- "beta" | |
- "alpha" | |
workflow_dispatch: | |
inputs: | |
draft: | |
type: boolean | |
description: "Draft release" | |
default: false | |
discussion: | |
type: boolean | |
description: "Create discussion" | |
default: false | |
release_type: | |
type: choice | |
description: "Release type" | |
default: "auto" | |
options: | |
- "auto" | |
- "patch" | |
- "minor" | |
- "major" | |
defaults: | |
run: | |
working-directory: custom_components/auto_backup | |
jobs: | |
publish: | |
name: "Publish" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v4 | |
- name: "Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: "Release Package 📦" | |
run: corepack enable && pnpm dlx @jcwillox/semantic-release-config | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SEMANTIC_RELEASE_GITHUB_DRAFT: ${{ inputs.draft }} | |
SEMANTIC_RELEASE_GITHUB_DISCUSSION: ${{ inputs.discussion }} | |
SEMANTIC_RELEASE_FORCE_RELEASE: ${{ inputs.release_type }} | |
SEMANTIC_RELEASE_CMD_PREPARE: | | |
yq -i '.version = "${nextRelease.version}"' manifest.json | |
zip auto_backup.zip -r ./ | |
SEMANTIC_RELEASE_GITHUB_ASSETS: "auto_backup.zip" |