Skip to content

Bump Version

Bump Version #34

Workflow file for this run

name: Bump Version
on:
workflow_dispatch:
inputs:
action:
description: 'Action to take'
required: true
default: 'patch'
type: choice
options:
- 'patch'
- 'minor'
- 'major'
push:
description: 'Push changes to remote'
required: true
default: false
type: boolean
workflow_call:
inputs:
action:
description: 'Action to take'
default: 'patch'
type: string
push:
description: 'Push changes to remote'
default: false
type: boolean
outputs:
tag:
value: ${{ jobs.version.outputs.tag }}
version:
value: ${{ jobs.version.outputs.version }}
jobs:
version:
name: Version
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.bump.outputs.tag }}
version: ${{ steps.bump.outputs.version }}
steps:
- name: Setup
uses: duplocloud/duploctl/.github/actions/setup@main
with:
optionals: "[build]"
fetch-depth: 0
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
- name: Bump Version
id: bump
run: ./scripts/version.py ${{ inputs.action }} ${{ inputs.push }}
- uses: actions/upload-artifact@v4
with:
name: notes-${{ steps.bump.outputs.tag }}
path: dist/notes.md
- name: Push Changes
if: ${{ inputs.push }}
run: |
git add CHANGELOG.md
git commit -m "Bump version to ${{ steps.bump.outputs.version }}"
git push origin HEAD:main --force
git tag ${{ steps.bump.outputs.tag }}
git push --tags