New versioning
This commit is contained in:
3
.github/workflows/validate_esphome_beta.yml
vendored
3
.github/workflows/validate_esphome_beta.yml
vendored
@@ -1,8 +1,7 @@
|
||||
---
|
||||
name: Validate ESPHome (Beta)
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
paths:
|
||||
- "*.yaml"
|
||||
|
||||
45
.github/workflows/versioning.yml
vendored
Normal file
45
.github/workflows/versioning.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# Workflow for managing versioning, tagging, and conditional updates
|
||||
---
|
||||
name: Bump Version and Tag
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
update_stable:
|
||||
description: "Update stable tag?"
|
||||
required: true
|
||||
default: "false"
|
||||
|
||||
jobs:
|
||||
versioning:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
|
||||
- name: Bump Version
|
||||
run: |
|
||||
chmod +x ./versioning/bump_version.sh
|
||||
./versioning/bump_version.sh
|
||||
|
||||
- name: Push Changes and Tags
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git push origin main
|
||||
git push origin --tags --force
|
||||
|
||||
- name: Conditionally Update Stable Tag
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.update_stable == 'true' }}
|
||||
run: |
|
||||
git tag -f stable
|
||||
git push origin stable --force
|
||||
...
|
||||
Reference in New Issue
Block a user