mirror of
https://github.com/zitadel/zitadel
synced 2024-11-22 00:39:36 +00:00
0267415126
* chore: avoid latest on maintenance releases * update semantic --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Version
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
semantic_version:
|
|
required: true
|
|
type: string
|
|
dry_run:
|
|
required: true
|
|
type: boolean
|
|
outputs:
|
|
version:
|
|
value: ${{ jobs.generate.outputs.version }}
|
|
published:
|
|
value: ${{jobs.generate.outputs.published }}
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-22.04
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
outputs:
|
|
version: ${{ steps.output.outputs.VERSION }}
|
|
published: ${{ steps.semantic.outputs.new_release_published }}
|
|
steps:
|
|
-
|
|
name: Source checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
uses: actions/download-artifact@v4
|
|
if: ${{ !inputs.dry_run }}
|
|
with:
|
|
path: .artifacts
|
|
-
|
|
name: Semantic Release
|
|
uses: cycjimmy/semantic-release-action@v4
|
|
id: semantic
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
dry_run: ${{ inputs.dry_run }}
|
|
semantic_version: ${{ inputs.semantic_version }}
|
|
extra_plugins: |
|
|
@semantic-release/exec@6.0.3
|
|
@semantic-release/github@10.0.2
|
|
-
|
|
name: output
|
|
id: output
|
|
run:
|
|
if [[ ! -z "${{ steps.semantic.outputs.new_release_version }}" ]]; then echo "VERSION=v${{ steps.semantic.outputs.new_release_version }}" >> "$GITHUB_OUTPUT"; else echo "VERSION=${{ github.sha }}" >> "$GITHUB_OUTPUT";fi
|