Skip to content

ci(latest): use github cli for cleanup of release and tag #27

ci(latest): use github cli for cleanup of release and tag

ci(latest): use github cli for cleanup of release and tag #27

Workflow file for this run

name: Latest
on:
# Triggers the workflow on push events on the default branch
workflow_dispatch:
push:
jobs:
create-dev-release-based-on-current-default-branch:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Get repo information
run: |
echo "Default branch is: ${{ github.event.repository.default_branch }}"
- name: Set variable for dev version
run: |
echo "DEV_VERSION=0.0.0" >> $GITHUB_ENV
- name: Delete Release and Tag
run: gh release delete v${{ env.DEV_VERSION }} --cleanup-tag
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push tag
id: push_tag
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.DEV_VERSION }}
tag_prefix: v
create_annotated_tag: true
- name: Output changelog since last version
run: echo "${{ steps.push_tag.outputs.changelog }}"