Skip to content

Commit

Permalink
Create initial set_version.yml
Browse files Browse the repository at this point in the history
This action doesn't make any changes to the code yet: to develop a
workflow_dispatch action we need to have _something_ on the default
branch so it can be
launched and tested.
  • Loading branch information
ajjackson committed Dec 11, 2024
1 parent 862c560 commit 8c7a6aa
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/set_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Write version number and tag"

on:
workflow_dispatch:
inputs:
ref:
description: "Target branch, tag or SHA"
required: true
type: string
version:
description: "New version number"
required: true
type: string

jobs:
show-branch:
runs-on: ubuntu-latest

steps:
- name: Show input parameters
shell: bash -l {0}
run: |
echo "${{ inputs.ref }}"
echo "${{ inputs.version }}"
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-tags: true
fetch-depth: 0

- name: "Tag locally"
shell: bash -l {0}
run: |
git tag ${{ inputs.version }}
- name: "Show updated log"
shell: bash -l {0}
run: |
git log --pretty=oneline --abbrev-commit --decorate | head

0 comments on commit 8c7a6aa

Please sign in to comment.