Merge pull request #24 from CubaDevOps/19-bug-automatic-releases-dont… #11
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: Automatic Versioning and Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# - name: Setup Git user | |
# run: | | |
# git config --global user.name "github-actions[bot]" | |
# git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Release | |
id: semver | |
uses: huggingface/semver-release-action@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create GitHub Release | |
if: steps.semver.outputs.released == 'true' | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.semver.outputs.tag }} | |
release_name: "Flexi Framework ${{ steps.semver.outputs.version }}" | |
body: "Changelog: ${{ steps.semver.outputs.changelog }}" | |
draft: false | |
prerelease: false |