Example of a GitHub-native approach to releases

With GitHub Releases, tags are created automatically each time a release is published and before the GitHub Actions release event is triggered.

Creating a new release

Viewing the triggered workflow

https://github.com/0x2b3bfa0/releases/actions/workflows/release.yml

Underlying release event

release:
types: [released]
- run: echo $(basename ${{ github.ref }})