Skip to content

Commit

Permalink
Changes to be committed:
Browse files Browse the repository at this point in the history
	new file:   .github/workflows/Bump Version.yml
	deleted:    .github/workflows/CreateTagAutomatically.yml
	new file:   .github/workflows/main.yml
  • Loading branch information
juancristobalgd1 committed Oct 19, 2023
1 parent 2a3c478 commit 3a0c80f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 97 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/Bump Version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bump Version

on:
push:
branches:
- main

jobs:
bump_version:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Check for uncommitted changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "There are uncommitted changes. Aborting..."
exit 1
fi
- name: Get latest version
id: get_tag
run: |
if git describe --tags --abbrev=0 > /dev/null 2>&1; then
VERSION=$(git describe --tags --abbrev=0)
echo "current_version=$VERSION" >> $GITHUB_ENV
else
echo "No version tags found in the repository"
exit 1
fi
shell: bash

- name: Bump release version
id: bump_version
uses: christian-draeger/[email protected]
with:
current-version: ${{ env.current_version }}
version-fragment: "bug" # Possible options are [ major | feature | bug | alpha | beta | pre | rc ]

- name: Log bumped version
run: echo "Next version is ${{ steps.bump_version.outputs.next-version }}"

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_version.outputs.next-version }}
release_name: Release ${{ steps.bump_version.outputs.next-version }}
97 changes: 0 additions & 97 deletions .github/workflows/CreateTagAutomatically.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Changelog
on:
release:
types:
- created
jobs:
changelog:
runs-on: ubuntu-20.04
steps:
- name: "✏️ Generate release changelog"
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3a0c80f

Please sign in to comment.