kurmann / GitHub.Workflows

Zentrale Sammelstelle für Reusable GitHub-Workflows.
Apache License 2.0
0 stars 0 forks source link

Nächsthöhere Version vorschlagen #30

Closed kurmann closed 6 months ago

kurmann commented 7 months ago

Neue Funktion: Versionsvergabe über den Release Crafter lösen.

Vorab-Aufgabe:

Aktuell nicht in Ordnung: image

kurmann commented 7 months ago

name: Reusable workflow

on:
  workflow_call:
    # Map the workflow outputs to job outputs
    outputs:
      firstword:
        description: "The first output string"
        value: ${{ jobs.example_job.outputs.output1 }}
      secondword:
        description: "The second output string"
        value: ${{ jobs.example_job.outputs.output2 }}

jobs:
  example_job:
    name: Generate output
    runs-on: ubuntu-latest
    # Map the job outputs to step outputs
    outputs:
      output1: ${{ steps.step1.outputs.firstword }}
      output2: ${{ steps.step2.outputs.secondword }}
    steps:
      - id: step1
        run: echo "firstword=hello" >> $GITHUB_OUTPUT
      - id: step2
        run: echo "secondword=world" >> $GITHUB_OUTPUT
kurmann commented 7 months ago
name: Call a reusable workflow and use its outputs

on:
  workflow_dispatch:

jobs:
  job1:
    uses: octo-org/example-repo/.github/workflows/called-workflow.yml@v1

  job2:
    runs-on: ubuntu-latest
    needs: job1
    steps:
      - run: echo ${{ needs.job1.outputs.firstword }} ${{ needs.job1.outputs.secondword }}
kurmann commented 6 months ago

Wie funktioniert das über den Release Drafter?

Versionsvergabe

Versionen können im Titel des Releases und dem Tag vergeben werden via Config

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'

Quelle: https://github.com/release-drafter/release-drafter?tab=readme-ov-file#version-resolver

kurmann commented 6 months ago

Preview-Versionen

When creating prerelease (prerelease: true), you can add a prerelease identifier to increment the prerelease version number, with the prerelease-identifier option. It accept any string, but it's recommended to use Semantic Versioning prerelease identifiers (alpha, beta, rc, etc).

Using prerelease-identifier automatically enable include-prereleases.

prerelease-identifier: 'alpha' # will create a prerelease with version number x.x.x-alpha.x

Quelle: https://github.com/release-drafter/release-drafter?tab=readme-ov-file#prerelease-increment