From 59672648d5b48cef6d6a089f2684c858815eb09c Mon Sep 17 00:00:00 2001 From: Vasek - Tom C Date: Thu, 15 Feb 2024 15:56:23 +0100 Subject: [PATCH] feat: add changie (#6) Setup Changie Add dagger dry release test Signed-off-by: Vasek - Tom C --- .changes/header.tpl.md | 6 ++++ .changes/unreleased/.gitkeep | 0 .changes/v0.0.1.md | 7 ++++ .changie.yaml | 24 +++++++++++++ .github/workflows/release-dry-run.yml | 30 ++++++++++++++++ .github/workflows/release.yml | 7 ++++ CHANGELOG.md | 16 +++++++++ RELEASING.md | 49 +++++++++++++++++++++++++++ 8 files changed, 139 insertions(+) create mode 100644 .changes/header.tpl.md create mode 100644 .changes/unreleased/.gitkeep create mode 100644 .changes/v0.0.1.md create mode 100644 .changie.yaml create mode 100644 .github/workflows/release-dry-run.yml create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.md create mode 100644 RELEASING.md diff --git a/.changes/header.tpl.md b/.changes/header.tpl.md new file mode 100644 index 0000000..df8faa7 --- /dev/null +++ b/.changes/header.tpl.md @@ -0,0 +1,6 @@ +# 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.0.0/), +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), +and is generated by [Changie](https://github.com/miniscruff/changie). diff --git a/.changes/unreleased/.gitkeep b/.changes/unreleased/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.changes/v0.0.1.md b/.changes/v0.0.1.md new file mode 100644 index 0000000..f4f8661 --- /dev/null +++ b/.changes/v0.0.1.md @@ -0,0 +1,7 @@ +## v0.0.1 - 2024-02-15 + + +### Added +* Quartz daggerverse experimental release + +Made with ❤️ by [Quartz](https://quartz.technology) diff --git a/.changie.yaml b/.changie.yaml new file mode 100644 index 0000000..d955de5 --- /dev/null +++ b/.changie.yaml @@ -0,0 +1,24 @@ +changesDir: .changes +unreleasedDir: unreleased +headerPath: header.tpl.md +changelogPath: CHANGELOG.md +versionExt: md +versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' +kindFormat: '### {{.Kind}}' +changeFormat: '* {{.Body}}' +kinds: + - label: Added + - label: Changed + - label: Deprecated + - label: Removed + - label: Fixed + - label: Security + - label: Dependencies +footerFormat: | + Made with ❤️ by [Quartz](https://quartz.technology) +newlines: + beforeChangelogVersion: 3 + afterVersion: 1 + beforeKind: 1 + beforeFooterTemplate: 1 +envPrefix: CHANGIE_ diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml new file mode 100644 index 0000000..4f46959 --- /dev/null +++ b/.github/workflows/release-dry-run.yml @@ -0,0 +1,30 @@ +name: Release Daggerverse modules (dry-run) + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + release-dry: + name: Run dry run publishing + runs-on: ubuntu-latest + env: + DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dagger + run: | + cd /usr/local + curl -L https://dl.dagger.io/dagger/install.sh | sh + dagger version + + - name: Run dry run publishing + run: | + dagger -m github.com/quartz-technology/daggerverse/daggerverse-cockpit call publish --repository=. --dryRun --exclude="deprecated" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d7a3fa7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,7 @@ +name: Release Daggerverse modules + +on: + release: + types: [published] + +jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6d71c8d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# 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.0.0/), +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), +and is generated by [Changie](https://github.com/miniscruff/changie). + + + +## v0.0.1 - 2024-02-15 + + +### Added +* Quartz daggerverse experimental release + +Made with ❤️ by [Quartz](https://quartz.technology) diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..64f9324 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,49 @@ +# Daggerverse release process + +## Requirements + +- [changie](https://changie.dev): a changelog management tool. +- [GitHub CLI](https://cli.github.com/): GitHub utility tools. + +## Verify your `main` branch is up to date + +```shell +git checkout main + +git pull + +git fetch --all --tags +``` + +## Store the current version + +```shell +export VERSION=$(changie latest) + +# echo $VERSION +``` + +## Update CHANGELOG + +```shell +git checkout -b release/bump-$VERSION + +changie batch patch +changie merge + +# Open the Changelog update PR and merge it if everything is okay. +``` + +💡 Replace `batch` by minor or major if it's another version. + +## Tag the release + +```shell +git tag origin $VERSION +git push origin $VERSION + +gh release create "Quartz Daggerverse - $VERSION" --draft --verify-tag --title "Quartz Daggerverse - $VERSION" --notes-files .changes/$VERSION.md +`` + +This will trigger the workflow to publish all modules to daggerverse. +