diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index f97cf13..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,36 +0,0 @@ -name-template: 'v$RESOLVED_VERSION 🚀' -tag-template: 'v$RESOLVED_VERSION' -categories: - - title: '✨ Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - label: - - 'chore' - - 'dependencies' - - title: '📝 Documentation' - label: 'docs' -exclude-labels: - - 'skip-changelog' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. -version-resolver: - major: - labels: - - 'major' - minor: - labels: - - 'minor' - patch: - labels: - - 'patch' - default: patch -template: | - $CHANGES - diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index e9e17f2..0000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Update Changelog' - -on: - release: - types: [released] - -jobs: - update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: main - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - release-notes: ${{ github.event.release.body }} - latest-version: ${{ github.event.release.name }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: main - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 353c636..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Publish - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -jobs: - publish: - env: - MIX_ENV: docs - HEX_API_KEY: ${{ secrets.HEX_API_KEY }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup BEAM - uses: erlef/setup-beam@v1 - with: - elixir-version: 1.13.x - otp-version: 24.x - - - name: Restore dependencies cache - uses: actions/cache@v2 - id: cache-elixir-deps - with: - path: | - deps - _build - key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} - - - name: Install Dependencies - if: steps.cache-elixir-deps.outputs.cache-hit != 'true' - run: mix do deps.get, deps.compile, compile - - - name: Build and publish package - run: mix hex.publish --yes diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c290e2b..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Release Drafter - -on: - push: - branches: - - 'main' - workflow_dispatch: - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c819dc..704cf72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,20 @@ # Changelog +## Upcoming -## v0.2.0 - - Include operators like <,>, starts_with etc. + -## v0.1.0 +## [Unreleased] - ReleaseDate +### Added +* Preserve errors when using Quarry.build vs Quarry.build! +* CI updates -- Initial implementation of library +### Fixed + +## [0.2.0] - 2021-12-25 +* Includes more filtering options like `less_than`, `greater_than`, `starts_with` etc + +## [0.1.0] - 2021-12-25 +* Initial release + + +[Unreleased]: https://github.com/enewbury/quarry/compare/v0.2.1...HEAD diff --git a/config/dev.exs b/config/dev.exs index 8b13789..d5db7c0 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1 +1,36 @@ +use Mix.Config +config :version_release, + tag_prefix: "v", + hex_publish: true, + changelog: %{ + creation: :manual, + replacements: [ + %{ + file: "README.md", + patterns: [ + %{search: ~r/quarry, \"~> (.*)\"/, replace: "quarry, \"{{version}}\""} + ] + }, + %{ + file: "CHANGELOG.md", + type: :changelog, + patterns: [ + %{search: "Unreleased", replace: "{{version}}", type: :unreleased}, + %{search: "...HEAD", replace: "...{{tag_name}}", global: false}, + %{search: "ReleaseDate", replace: "{{date}}"}, + %{ + search: "", + replace: "\n\n## [Unreleased] - ReleaseDate", + global: false + }, + %{ + search: "", + replace: + "\n[Unreleased]: https://github.com/enewbury/quarry/compare/{{tag_name}}...HEAD", + global: false + } + ] + } + ] + } diff --git a/mix.exs b/mix.exs index 24e0b97..bc9a5d7 100644 --- a/mix.exs +++ b/mix.exs @@ -37,6 +37,7 @@ defmodule Quarry.MixProject do [ {:ecto, "~> 3.5"}, {:ex_doc, "~> 0.24", only: :dev, runtime: false}, + {:version_release, "~> 0.1.0", only: :dev, runtime: false}, {:ecto_sql, "~> 3.5", only: [:dev, :test]}, {:postgrex, "~> 0.14", only: [:test]}, {:ex_machina, "~> 2.3", only: [:test]}, diff --git a/mix.lock b/mix.lock index f8f3ff6..1e4552d 100644 --- a/mix.lock +++ b/mix.lock @@ -24,4 +24,5 @@ "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, "telemetry": {:hex, :telemetry, "1.0.0", "0f453a102cdf13d506b7c0ab158324c337c41f1cc7548f0bc0e130bbf0ae9452", [:rebar3], [], "hexpm", "73bc09fa59b4a0284efb4624335583c528e07ec9ae76aca96ea0673850aec57a"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, + "version_release": {:hex, :version_release, "0.1.0", "44f75eddc8d1fbe9c1ef3dde84b07e4f0b714783ddbb5d06cc22a106c7b03fe4", [:mix], [], "hexpm", "eeb44602b598cd9407101f335d1088fd9968ab44e6859f6044e0040f42751f45"}, }