Skip to content

Merge pull request #20 from typemytype/main #25

Merge pull request #20 from typemytype/main

Merge pull request #20 from typemytype/main #25

Workflow file for this run

name: Create a tag
on:
push
permissions: write-all
jobs:
create_tag_from_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read yaml
uses: actions-tools/yaml-outputs@v2
id: info-action
with:
file-path: info.yaml
- name: Read version from yaml
run : |
echo version: ${{ steps.info-action.outputs.version }}
- name: Create tag if not present
run: |
if [ $(git tag -l "${{ steps.info-action.outputs.version }}") ]; then
echo "Tag ${{ steps.info-action.outputs.version }} exists"
else
echo "Create tag ${{ steps.info-action.outputs.version }}"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a ${{ steps.info-action.outputs.version }} -m "Version ${{ steps.info-action.outputs.version }}"
git push --follow-tags
fi