Dev release on latest commit of default branch #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- 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 | |
- uses: dev-drprasad/delete-tag-and-release@v1.0 # PRERELEASE is v1.0 and can also be used to test and give us feedback | |
with: | |
tag_name: v${{ env.DEV_VERSION }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
delete_release: true | |
- 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 |