diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md
deleted file mode 100644
index 687d7023..00000000
--- a/.chglog/CHANGELOG.tpl.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file.
-
-{{ if .Versions -}}
-
-## [Unreleased]
-{{ if .Unreleased.CommitGroups -}}
-{{ range .Unreleased.CommitGroups -}}
-### {{ .Title }}
-{{ range .Commits -}}
-{{/* SKIPPING RULES - START */ -}}
-{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}}
-{{- if not (contains .Subject "[ci skip]") -}}
-{{- if not (contains .Subject "[skip ci]") -}}
-{{- if not (hasPrefix .Subject "Merge pull request ") -}}
-{{- if not (hasPrefix .Subject "Added CHANGELOG") -}}
-{{- /* SKIPPING RULES - END */ -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{/* SKIPPING RULES - START */ -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{/* SKIPPING RULES - END */ -}}
-{{ end }}
-{{ end -}}
-{{ else }}
-{{ range .Unreleased.Commits -}}
-{{/* SKIPPING RULES - START */ -}}
-{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}}
-{{- if not (contains .Subject "[ci skip]") -}}
-{{- if not (contains .Subject "[skip ci]") -}}
-{{- if not (hasPrefix .Subject "Merge pull request ") -}}
-{{- if not (hasPrefix .Subject "Added CHANGELOG") -}}
-{{- /* SKIPPING RULES - END */ -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{/* SKIPPING RULES - START */ -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{/* SKIPPING RULES - END */ -}}
-{{ end }}
-{{ end -}}
-{{ end -}}
-
-{{ range .Versions }}
-
-## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
-{{ if .CommitGroups -}}
-{{ range .CommitGroups -}}
-### {{ .Title }}
-{{ range .Commits -}}
-{{/* SKIPPING RULES - START */ -}}
-{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}}
-{{- if not (contains .Subject "[ci skip]") -}}
-{{- if not (contains .Subject "[skip ci]") -}}
-{{- if not (hasPrefix .Subject "Merge pull request ") -}}
-{{- if not (hasPrefix .Subject "Added CHANGELOG") -}}
-{{- /* SKIPPING RULES - END */ -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{/* SKIPPING RULES - START */ -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{/* SKIPPING RULES - END */ -}}
-{{ end }}
-{{ end -}}
-{{ else }}
-{{ range .Commits -}}
-{{/* SKIPPING RULES - START */ -}}
-{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}}
-{{- if not (contains .Subject "[ci skip]") -}}
-{{- if not (contains .Subject "[skip ci]") -}}
-{{- if not (hasPrefix .Subject "Merge pull request ") -}}
-{{- if not (hasPrefix .Subject "Added CHANGELOG") -}}
-{{- /* SKIPPING RULES - END */ -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{/* SKIPPING RULES - START */ -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-{{/* SKIPPING RULES - END */ -}}
-{{ end }}
-{{ end -}}
-
-{{- if .NoteGroups -}}
-{{ range .NoteGroups -}}
-### {{ .Title }}
-{{ range .Notes }}
-{{ .Body }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-
-{{- if .Versions }}
-[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
-{{ range .Versions -}}
-{{ if .Tag.Previous -}}
-[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
diff --git a/.chglog/config.yml b/.chglog/config.yml
deleted file mode 100644
index 5ebb8f3b..00000000
--- a/.chglog/config.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-style: github
-template: CHANGELOG.tpl.md
-info:
- title: CHANGELOG
- repository_url: https://github.com/terraform-aws-modules/terraform-aws-s3-bucket
-options:
- header:
- pattern: "^(.*)$"
- pattern_maps:
- - Subject
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..75567201
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,31 @@
+name: Release
+
+on:
+ push:
+ branches:
+ - main
+ - master
+ paths:
+ - '**/*.py'
+ - '**/*.tf'
+
+jobs:
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ fetch-depth: 0
+
+ - name: Release
+ uses: cycjimmy/semantic-release-action@v2
+ with:
+ semantic_version: 18.0.0
+ extra_plugins: |
+ @semantic-release/changelog@6.0.0
+ @semantic-release/git@10.0.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 896c01ef..65c0f394 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -43,3 +43,4 @@ repos:
rev: v4.0.1
hooks:
- id: check-merge-conflict
+ - id: end-of-file-fixer
diff --git a/.releaserc.json b/.releaserc.json
new file mode 100644
index 00000000..ca52a586
--- /dev/null
+++ b/.releaserc.json
@@ -0,0 +1,28 @@
+{
+ "branches": [
+ "main",
+ "master"
+ ],
+ "ci": false,
+ "plugins": [
+ "@semantic-release/commit-analyzer",
+ "@semantic-release/release-notes-generator",
+ "@semantic-release/github",
+ [
+ "@semantic-release/changelog",
+ {
+ "changelogFile": "CHANGELOG.md",
+ "changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file"
+ }
+ ],
+ [
+ "@semantic-release/git",
+ {
+ "assets": [
+ "CHANGELOG.md"
+ ],
+ "message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
+ }
+ ]
+ ]
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4054871a..13a34fb9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,12 +1,3 @@
-# Change Log
-
-All notable changes to this project will be documented in this file.
-
-
-## [Unreleased]
-
-
-
## [v2.11.0] - 2021-11-07
diff --git a/Makefile b/Makefile
deleted file mode 100644
index f17351f1..00000000
--- a/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-.PHONY: changelog release
-
-scope ?= "minor"
-
-changelog-unrelease:
- git-chglog --no-case -o CHANGELOG.md
-
-changelog:
- git-chglog --no-case -o CHANGELOG.md --next-tag `semtag final -s $(scope) -o -f`
-
-release:
- semtag final -s $(scope)
diff --git a/examples/s3-replication/main.tf b/examples/s3-replication/main.tf
index af3f0c1c..904abbf3 100644
--- a/examples/s3-replication/main.tf
+++ b/examples/s3-replication/main.tf
@@ -136,4 +136,4 @@ module "s3_bucket" {
]
}
-}
\ No newline at end of file
+}