Bump Version #43
This file contains 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: 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 }} | |
secrets: | |
GH_APP_KEY: | |
description: GitHub App private key | |
required: true | |
jobs: | |
version: | |
name: Version | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.bump.outputs.tag }} | |
version: ${{ steps.bump.outputs.version }} | |
steps: | |
- name: Setup | |
id: 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 }} ${{ steps.setup.outputs.token }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: notes-${{ steps.bump.outputs.tag }} | |
path: dist/notes.md |