Skip to content

dfds

dfds #2

name: 'Create new version'

Check failure on line 1 in .github/workflows/create-new-version.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/create-new-version.yml

Invalid workflow file

(Line: 30, Col: 14): Unexpected symbol: '+'. Located at position 61 within expression: inputs.version == 'Breaking changes' && fromJson(env.major) + 1 || fromJson(env.major), (Line: 31, Col: 14): Unexpected symbol: '+'. Located at position 57 within expression: inputs.version == 'Minor update' && fromJson(env.minor) + 1 || fromJson(env.minor)
on:
workflow_dispatch:
inputs:
version:
description: 'Select the type of version to create'
required: true
options:
- 'Breaking changes'
- 'Minor update'
permissions:
actions: read
pages: write
id-token: write
contents: write
concurrency:
group: create-new-version-${{ github.head_ref || github.ref }}
cancel-in-progress: false
jobs:
versioning:
name: 'Determine version'
needs: [workflow-variables]
runs-on: ubuntu-latest
outputs:
major: ${{ inputs.version == 'Breaking changes' && fromJson(env.major) + 1 || fromJson(env.major) }}
minor: ${{ inputs.version == 'Minor update' && fromJson(env.minor) + 1 || fromJson(env.minor) }}
steps:
- name: 'Checkout ${{ github.head_ref || github.ref }}'
uses: actions/checkout@v4
- name: 'Determine versions'
uses: ./.github/actions/determine-version
id: determine-version
with:
config-file-path: './.gitversion/version.yml'
run-number: ${{ github.run-number }}
variables:
name: 'Set workflow variables'
runs-on: ubuntu-latest
needs: [versioning]
steps:
- name: 'Set workflow variables'
id: set-variables
run: |
echo "major: ${{ steps.versioning.outputs.major }}"
echo "minor: ${{ steps.versioning.outputs.minor }}"