Tagging #6
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: Tagging | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: Setting up git config | |
run: | | |
git config --global user.name "trks" | |
git config --global user.email "[email protected]" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- run: sudo npm install -g standard-version | |
- name: Generate tag and release body | |
run: standard-version --infile RELEASE_BODY.md --skip.commit | |
- name: Publish tag | |
id: publish_tag | |
run: | | |
git push --follow-tags | |
echo "tag_name=$(git describe HEAD --abbrev=0)" >> $GITHUB_OUTPUT | |
- name: Create release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_name: Release ${{ steps.publish_tag.outputs.tag_name }} | |
tag_name: ${{ steps.publish_tag.outputs.tag_name }} | |
body_path: RELEASE_BODY.md |