From d6353d2a9a1846acd91611ae73b2ce7af3d923e3 Mon Sep 17 00:00:00 2001 From: Sergey Snozyk Date: Thu, 12 Oct 2023 17:02:58 +0200 Subject: [PATCH] prepare release release-as: 0.1.0 --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ mix.exs | 25 +++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..38e272d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Run Release Please Action + uses: GoogleCloudPlatform/release-please-action@v3 + id: release + with: + release-type: elixir + bump-minor-pre-major: true + bump-patch-for-minor-pre-major: true + extra-files: | + README.md + + - name: Checkout + uses: actions/checkout@v3 + if: ${{ steps.release.outputs.release_created }} + + - name: Tag major and minor versions + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.github-token }}@github.com/google-github-actions/release-please-action.git" + git tag -d v${{ steps.release.outputs.major }} || true + git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git push origin :v${{ steps.release.outputs.major }} || true + git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" + git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" + git push origin v${{ steps.release.outputs.major }} + git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} diff --git a/mix.exs b/mix.exs index 2901931..43e50f9 100644 --- a/mix.exs +++ b/mix.exs @@ -1,13 +1,21 @@ defmodule Minch.MixProject do use Mix.Project + @source_url "https://github.com/nmbrone/minch" + def project do [ app: :minch, version: "0.1.0", elixir: "~> 1.15", start_permanent: Mix.env() == :prod, - deps: deps() + deps: deps(), + description: "A WebSocket client", + source_url: @source_url, + homepage_url: @source_url, + package: package(), + name: "Minch", + docs: docs() ] end @@ -26,4 +34,19 @@ defmodule Minch.MixProject do {:mint_web_socket, "~> 1.0"} ] end + + defp package do + [ + maintainers: ["Serhii Snozyk"], + licenses: ["MIT"], + links: %{"GitHub" => @source_url} + ] + end + + defp docs do + [ + main: "Minch", + extras: ["CHANGELOG.md"] + ] + end end