diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 8b66647..86fadd0 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -14,23 +14,29 @@ jobs: runs-on: ubuntu-latest steps: + - name: 'Checkout source code' uses: 'actions/checkout@v3' with: fetch-depth: '0' # to get all the tags locally + # https://stackoverflow.com/questions/67550727/push-event-doesnt-trigger-workflow-on-push-paths-github-actions + token: ${{ secrets.TOKEN_GITHUB_FOR_GITHUB_ACTION }} + + - name: 'Verify version is semver formatted (X.X.X)' env: NEW_TAG: ${{ github.event.inputs.releaseVersion }} run: | echo $NEW_TAG | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' - - name: 'Verify version is not already used as a git tag' env: NEW_TAG: ${{ github.event.inputs.releaseVersion }} run: | [[ "$(git tag --list | grep $NEW_TAG)" == "" ]] && exit 0 || exit 1 + + - name: 'Generates the new version (patch few files + git tag)' env: NEW_TAG: ${{ github.event.inputs.releaseVersion }} @@ -41,3 +47,11 @@ jobs: git commit README.md docker-compose.yml -m "Version $NEW_TAG" git tag $NEW_TAG git push && git push --tags + + + + - name: 'Create the github release' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.event.inputs.releaseVersion }} + generate_release_notes: true