Skip to content

Update lukaszraczylo/semver-generator action to v1.12.243 (#137) #496

Update lukaszraczylo/semver-generator action to v1.12.243 (#137)

Update lukaszraczylo/semver-generator action to v1.12.243 (#137) #496

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: read-all
jobs:
build:
name: Build
runs-on: ubuntu-latest
needs:
- semver
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
.esphome
key: ${{ runner.os }}-${{ hashFiles('src/*') }}-${{ hashFiles('childrensclock.yaml') }}
- uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 # v0.3
with:
runCmd: rake test
- uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 # v0.3
with:
runCmd: rake build
env: |
VERSION=${{ needs.semver.outputs.semantic_version}}
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: firmware-factory.bin
path: .esphome/build/childrensclock/.pioenvs/childrensclock/firmware.factory.bin
semver:
name: Generate a semantic version number
runs-on: ubuntu-latest
outputs:
semantic_version: ${{ steps.semver.outputs.semantic_version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: "0"
- id: semver
uses: lukaszraczylo/semver-generator@a5b1c83b90b4d001bb35e266e83b757550d6e57b # 1.12.243
with:
config_file: .github/semver.yaml
repository_local: true
release-binaries:
name: Release
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs:
- build
- semver
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: firmware-factory.bin
- uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # tag=v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: v${{ needs.semver.outputs.semantic_version}}
prerelease: false
title: v${{ needs.semver.outputs.semantic_version}}
files: "firmware-factory.bin"