-
-
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.
Merge pull request #3 from luislavena/introduce-changie
Introduce changie for CHANGELOG management & releases
- Loading branch information
Showing
16 changed files
with
268 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). | ||
|
||
Please take notes of *Changed*, *Removed* and *Deprecated* items prior | ||
upgrading. |
Empty file.
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,5 @@ | ||
kind: internal | ||
body: Enforces CHANGELOG entries on PRs | ||
time: 2024-07-20T18:14:28.964448+02:00 | ||
custom: | ||
Issue: "" |
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,5 @@ | ||
kind: internal | ||
body: Enforces formatted Crystal code | ||
time: 2024-07-20T20:32:32.360677+02:00 | ||
custom: | ||
Issue: "" |
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,5 @@ | ||
kind: internal | ||
body: Ensure spec passes in CI | ||
time: 2024-07-20T20:33:58.725769+02:00 | ||
custom: | ||
Issue: "" |
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,5 @@ | ||
kind: internal | ||
body: Automate release generation with PR | ||
time: 2024-08-04T12:07:15.744269+02:00 | ||
custom: | ||
Issue: "" |
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,5 @@ | ||
kind: internal | ||
body: Automate release on merge of Release PR | ||
time: 2024-08-04T12:10:37.508443+02:00 | ||
custom: | ||
Issue: "" |
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 @@ | ||
## v0.2.0 - 2024-01-06 | ||
|
||
### *Breaking change* | ||
|
||
- Change migration files and commands from `up` to `migrate` and `down` to `rollback`. | ||
|
||
### Fixes | ||
|
||
- Properly close database when finishing. |
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,6 @@ | ||
## v0.3.2 - 2024-05-06 | ||
|
||
### Fixes | ||
|
||
- Correctly load `Drift.embed_as` helper | ||
- Solve mismatch between tag/shards.yml |
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,48 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
headerPath: header.tpl.md | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: "### {{.Kind}}" | ||
changeFormat: '- {{.Body}}{{- if not (eq .Custom.Issue "")}} ([#{{.Custom.Issue}}](https://github.com/luislavena/drift/issues/{{.Custom.Issue}})){{- end }}' | ||
kinds: | ||
- label: Added | ||
key: added | ||
auto: minor | ||
- label: Improved | ||
key: improved | ||
auto: minor | ||
- label: Changed | ||
key: changed | ||
auto: major | ||
- label: Deprecated | ||
key: deprecated | ||
auto: minor | ||
- label: Removed | ||
key: removed | ||
auto: major | ||
- label: Fixed | ||
key: fixed | ||
auto: patch | ||
- label: Security | ||
key: security | ||
auto: patch | ||
- label: Internal | ||
key: internal | ||
auto: patch | ||
custom: | ||
- key: Issue | ||
type: int | ||
minInt: 1 | ||
optional: true | ||
newlines: | ||
beforeChangelogVersion: 1 | ||
afterKind: 1 | ||
beforeKind: 1 | ||
endOfVersion: 1 | ||
envPrefix: CHANGIE_ | ||
replacements: | ||
- path: "shard.yml" | ||
find: "^version: .*" | ||
replace: "version: {{.VersionNoPrefix}}" |
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,28 @@ | ||
name: Check CHANGELOG entries | ||
|
||
on: | ||
pull_request: | ||
types: | ||
# On by default if you specify no types. | ||
- opened | ||
- reopened | ||
- synchronize | ||
# For `skip-label` only. | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
check-changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for CHANGELOG entry presence | ||
uses: brettcannon/check-for-changed-files@v1 | ||
with: | ||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
file-pattern: | | ||
.changes/unreleased/*.yaml | ||
CHANGELOG.md | ||
skip-label: skip changelog | ||
failure-message: >- | ||
Missing a changelog file in ${file-pattern}; please add one or | ||
apply the ${skip-label} label to the pull request |
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,35 @@ | ||
name: Create Release PR | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Batch changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: batch auto | ||
|
||
- name: Merge changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: merge | ||
|
||
- name: Get the latest version | ||
id: latest | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: latest | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
title: Release ${{ steps.latest.outputs.output }} | ||
branch: release/${{ steps.latest.outputs.output }} | ||
commit-message: Release ${{ steps.latest.outputs.output }} |
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,39 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- CHANGELOG.md | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get the latest version | ||
id: latest | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
args: latest | ||
|
||
- name: Create tag | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
git tag -a ${{ steps.latest.outputs.output }} -m "Release ${{ steps.latest.outputs.output }}" | ||
git push --tags | ||
- name: Create release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
name: ${{ steps.latest.outputs.output }} | ||
tag_name: ${{ steps.latest.outputs.output }} | ||
body_path: .changes/${{ steps.latest.outputs.output }}.md | ||
# TODO: include release binaries |
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,36 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/**" | ||
- "shard.*" | ||
- "spec/**" | ||
- "src/**" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/**" | ||
- "shard.*" | ||
- "spec/**" | ||
- "src/**" | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: crystal-lang/install-crystal@v1 | ||
- run: crystal tool format --check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: crystal-lang/install-crystal@v1 | ||
- run: shards install | ||
- run: crystal spec |
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,27 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). | ||
|
||
Please take notes of *Changed*, *Removed* and *Deprecated* items prior | ||
upgrading. | ||
|
||
## v0.3.2 - 2024-05-06 | ||
|
||
### Fixes | ||
|
||
- Correctly load `Drift.embed_as` helper | ||
- Solve mismatch between tag/shards.yml | ||
|
||
## v0.2.0 - 2024-01-06 | ||
|
||
### *Breaking change* | ||
|
||
- Change migration files and commands from `up` to `migrate` and `down` to `rollback`. | ||
|
||
### Fixes | ||
|
||
- Properly close database when finishing. |