This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Create new version' | ||
|
Check failure on line 1 in .github/workflows/create-new-version.yml
|
||
| 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 }}" | ||