Skip to content

Remove check-github-workflows (#255) #75

Remove check-github-workflows (#255)

Remove check-github-workflows (#255) #75

Workflow file for this run

---
name: Bump Version Tag
on:
push:
branches:
- main
paths:
- "**/*"
- "!**/*.json5"
- "!**/*.md"
- "!**/*.txt"
- "!.github/**"
- "!.gitignore"
- "!.pre-commit-config.yaml"
- "!pyproject.toml"
workflow_dispatch:
jobs:
tags:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Bump version and push tag
id: bump-version
# yamllint disable-line rule:line-length
uses: anothrNick/github-tag-action@f278d49d30cdd8775cc3e7dd00b5ee11686ee297 # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Extract major tag
id: extract-major
run: >-
echo major_tag="$(echo ${{ steps.bump-version.outputs.new_tag }} | cut
-d'.' -f1)" >> "$GITHUB_OUTPUT"
# this is done manually as need a non-annotated tag
# TODO: replace with https://github.com/actions/publish-action
- name: Update major tag
run: >-
git config user.name github-actions; git config user.email
[email protected]; git tag --force ${{
steps.extract-major.outputs.major_tag }} ${{
steps.bump-version.outputs.new_tag }}; git push origin ${{
steps.extract-major.outputs.major_tag }} --force