Skip to content

Update copyright year #29

Update copyright year

Update copyright year #29

name: Create Master Flat Release
on:
push:
branches: [master]
jobs:
create-master-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.WORKFLOW_MANAGEMENT_TOKEN }}
- name: Check tag exists for SHA
id: check_exists
run: |
git fetch --unshallow --tags
git show-ref --tags -d
if [[ $(git show-ref --tags -d | grep "${{ github.sha }}") =~ "v" ]]; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "exists"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "does not exist"
fi
- uses: BSteffaniak/delete-older-releases@master
if: ${{ steps.check_exists.outputs.exists != 'true' }}
with:
keep_latest: 2
delete_tag_pattern: ^master-[0-9a-f]{10,10}$
regex: true
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_MANAGEMENT_TOKEN }}
- name: Create and push tag
if: ${{ steps.check_exists.outputs.exists != 'true' }}
run: |
git tag master-$(git rev-parse --short=10 HEAD)
git push origin master-$(git rev-parse --short=10 HEAD)