Skip to content

Commit

Permalink
ci: added a workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylan Gökkaya committed Mar 17, 2022
1 parent 3757792 commit de701e7
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/chglog/RELEASE.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ range .Versions }}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})

{{ range .CommitGroups -}}
### {{ .Title }}

{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts

{{ range .RevertCommits -}}
* {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
41 changes: 41 additions & 0 deletions .github/chglog/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
style: github
template: RELEASE.tpl.md
info:
repository_url: https://github.com/insomnimus/ps-dotenv
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
sort_by: Custom
title_order:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
ci: Continuous Integration
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
71 changes: 71 additions & 0 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "All",
"on": [
"push",
"pull_request"
],
"jobs": {
"test": {
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Setup | Checkout",
"uses": "actions/checkout@v2"
},
{
"name": "Setup | Install Dotnet",
"uses": "actions/setup-dotnet@v1",
"with": {
"dotnet-version": "6.0.x"
}
},
{
"name": "Check | Tests",
"run": "dotnet test"
}
]
},
"release": {
"name": "Build and Release",
"needs": "test",
"if": "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')",
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Setup | Checkout",
"uses": "actions/checkout@v2"
},
{
"name": "Setup | Install Dotnet",
"uses": "actions/setup-dotnet@v1",
"with": {
"dotnet-version": "6.0.x"
}
},
{
"name": "Build | Build",
"run": "pwsh ./build.ps1 -release\n7z a Dotenv.zip Dotenv"
},
{
"name": "Setup | go",
"uses": "actions/setup-go@v2",
"with": {
"go-version": "^1.15.7"
}
},
{
"name": "Setup | Release notes",
"run": "GO111MODULE=on go install github.com/git-chglog/git-chglog/cmd/[email protected]\ngit-chglog -c .github/chglog/release.yml \"$(git describe --tags)\" > RELEASE.md"
},
{
"name": "Deploy | Publish",
"uses": "softprops/action-gh-release@v1",
"with": {
"files": "Dotenv.zip",
"body_path": "RELEASE.md"
}
}
]
}
}
}

0 comments on commit de701e7

Please sign in to comment.