summaryrefslogtreecommitdiff
path: root/.github/workflows/generate_release.yml
blob: ff6ef1ea95f86263e06d15434390043fb3e1f7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Generate Release

on:
  workflow_call:
    inputs:
      handwritten:
        required: false
        type: string
      release_tag:
        required: true
        type: string
  workflow_dispatch:
    inputs:
      handwritten:
        description: 'Small changelog about changes in this build'
        required: false
        type: string
      release_tag:
        required: true
        type: string

permissions: {}

jobs:
  generate-release:
    runs-on: ubuntu-24.04
    permissions:
      contents: write


    steps:
      - uses: actions/checkout@v7.0.1
        with:
          fetch-depth: 50

      - name: Determine release channel
        id: target
        run: |
          target="${GITHUB_REF_NAME}"
          [[ "${target}" == "main" ]] && target="stable"
          echo "target=${target}" >> "$GITHUB_OUTPUT"

      - name: Generate release
        uses: softprops/action-gh-release@v3.0.2
        with:
          tag_name: "${{ inputs.release_tag }}"
          name: "AeroCore OS ${{ inputs.release_tag }}"
          body: |
            ${{ inputs.handwritten }}
          prerelease: ${{ steps.target.outputs.target != 'stable' }}
          make_latest: ${{ steps.target.outputs.target == 'stable' }}