-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
files: changelog.md | ||
draft: false | ||
prerelease: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Create Git Tag | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-tag: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract version and commit message | ||
id: extract-info | ||
run: | | ||
cat version.txt | ||
version=$(cat version.txt) # Replace with the path to your version file | ||
echo "::set-output name=version::$version" | ||
echo "::set-output name=commit_message::$commit_message" | ||
- name: Determine version increment | ||
id: increment-version | ||
run: | | ||
commit_message=$(git log -1 --pretty=%s) | ||
major_version=$(echo ${{ steps.extract-info.outputs.version }} | awk -F'.' '{print $1}') | ||
minor_version=$(echo ${{ steps.extract-info.outputs.version }} | awk -F'.' '{print $2}') | ||
echo "$commit_message" | ||
if [[ $commit_message == *"major"* ]]; then | ||
echo "New major version" | ||
new_major_version=$((major_version + 1)) | ||
new_version="$new_major_version.0" | ||
else | ||
echo "New minor version" | ||
new_minor_version=$((minor + 1)) | ||
new_version="$major_version.$new_minor_version" | ||
fi | ||
echo "::set-output name=new_version::$new_version" | ||
- name: Update version.txt | ||
run: | | ||
echo "${{ steps.increment-version.outputs.new_version }}" > version.txt | ||
git config user.name "bcanfield" | ||
git config user.email "[email protected]" | ||
git add version.txt | ||
- name: Update changelog.md | ||
run: | | ||
echo "## v${{ steps.increment-version.outputs.new_version }}" >> changelog.md | ||
echo "- Change: ${{ steps.extract-info.outputs.commit_message }}" >> changelog.md | ||
echo "" >> changelog.md | ||
git add changelog.md | ||
git commit -m "v${{ steps.increment-version.outputs.new_version }}" | ||
git push | ||
- name: Create Git Tag | ||
run: | | ||
git tag -a -m "v${{ steps.increment-version.outputs.new_version }}" v${{ steps.increment-version.outputs.new_version }} | ||
git push origin v${{ steps.increment-version.outputs.new_version }} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## Version 0.0.1 | ||
- Commit Message: Test | ||
- Commit Body: Test | ||
|
||
## Version 0.0.2 | ||
- Commit Message: Test | ||
- Commit Body: | ||
|
||
## Version 0.0.3 | ||
- Commit Message: Test | ||
- Commit Body: | ||
|
||
## Version 0.0.4 | ||
- Commit Message: Test2 | ||
- Commit Body: | ||
|
||
## Version 0.0.5 | ||
- Commit Message: Test2 | ||
- Commit Body: | ||
|
||
## Version 0.0.6 | ||
- Commit Message: Test2 | ||
- Commit Body: | ||
|
||
## Version 0.0.7 | ||
- Commit Message: Test | ||
- Commit Body: | ||
|
||
## Version 0.0.8 | ||
- Commit Message: Test2 | ||
- Commit Body: | ||
|
||
## Version 0.1 | ||
- Change: test | ||
|
||
## Version 0.1 | ||
- Change: major: test | ||
|
||
## Version 0.1 | ||
- Change: major: test | ||
|
||
## Version 0.1 | ||
- Change: major | ||
|
||
## Version 0.1 | ||
- Change: major test | ||
|
||
## Version 0.1 | ||
- Change: major test | ||
|
||
## Version 0.1 | ||
- Change: major test | ||
|
||
## Version 1.0 | ||
- Change: | ||
|
||
## v1.1 | ||
- Change: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>This is the title of the webpage!</title> | ||
</head> | ||
<body> | ||
<p>This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents.</p> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0 |