From d870161ed838673247c28e1996daaf5e13e72801 Mon Sep 17 00:00:00 2001 From: Stefan Fochler Date: Thu, 28 Aug 2025 13:29:23 +0200 Subject: [PATCH 1/2] Add CI for tests, version bump & package release --- .github/actions/publish_release.yml | 17 +++++++++++++ .github/actions/test.yml | 39 +++++++++++++++++++++++++++++ .github/actions/version_bump.yml | 12 +++++++++ .github/changelog-config.json | 32 +++++++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 .github/actions/publish_release.yml create mode 100644 .github/actions/test.yml create mode 100644 .github/actions/version_bump.yml create mode 100644 .github/changelog-config.json diff --git a/.github/actions/publish_release.yml b/.github/actions/publish_release.yml new file mode 100644 index 0000000..635d84c --- /dev/null +++ b/.github/actions/publish_release.yml @@ -0,0 +1,17 @@ +name: 🔩 Publish Release (Auto) + +on: + push: + branches: + - main + paths: + - "mix.exs" + +jobs: + release: + name: Publish Release + uses: box-id/github-actions/.github/workflows/elixir_publish_release.yml@main + with: + publish-to-hex: true + version-prefix: "v" + secrets: inherit diff --git a/.github/actions/test.yml b/.github/actions/test.yml new file mode 100644 index 0000000..e2ec652 --- /dev/null +++ b/.github/actions/test.yml @@ -0,0 +1,39 @@ +name: Run tests + +on: push + +jobs: + test: + runs-on: ubuntu-latest + name: Elixir ${{matrix.elixir}} on OTP ${{matrix.otp}} + strategy: + matrix: + otp: ["28.x"] + elixir: ["1.18.x"] + env: + MIX_ENV: test + steps: + - name: Check out Repository + uses: actions/checkout@v4 + + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: ${{matrix.otp}} + elixir-version: ${{matrix.elixir}} + + - name: Retrieve Mix Dependencies Cache + uses: actions/cache@v4 + with: + path: | + deps + _build + key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- + + - name: Fetch Mix Dependencies + run: mix deps.get + + - name: Run Tests + run: mix test diff --git a/.github/actions/version_bump.yml b/.github/actions/version_bump.yml new file mode 100644 index 0000000..bc9b546 --- /dev/null +++ b/.github/actions/version_bump.yml @@ -0,0 +1,12 @@ +name: 👉 Trigger Version Bump + +on: + workflow_dispatch: + +jobs: + create_version_bump_pr: + name: Create Version Bump PR + uses: box-id/github-actions-oss/.github/workflows/elixir_version_bump.yml@main + with: + version-prefix: "v" + secrets: inherit diff --git a/.github/changelog-config.json b/.github/changelog-config.json new file mode 100644 index 0000000..ab9dbb4 --- /dev/null +++ b/.github/changelog-config.json @@ -0,0 +1,32 @@ +{ + "categories": [ + { + "title": "## 🚨 Breaking Changes", + "labels": ["breaking"] + }, + { + "title": "## ⚠️ Deprecations", + "labels": ["deprecation"] + }, + { + "title": "## 🎉 Improvements", + "labels": ["improvement"] + }, + { + "title": "## 🐞 Bug Fixes", + "labels": ["bug"] + }, + { + "title": "## 🛠️ Other Changes", + "labels": ["*"] + } + ], + "transformers": [ + { + "pattern": "^([A-Za-z]+-[0-9]+):? (.*)$", + "target": "$2 ([$1](https://box-id.atlassian.net/browse/$1))" + } + ], + "template": "#{{CHANGELOG}}**Full Changelog:** #{{RELEASE_DIFF}}", + "pr_template": "- #{{TITLE}} [##{{NUMBER}}](#{{URL}})" +} From 6bbcc20bdf80ce457c28718736dd2cc6b4ec2c60 Mon Sep 17 00:00:00 2001 From: Stefan Fochler Date: Thu, 28 Aug 2025 13:31:20 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Rename=20.github/actions=20to=20.github/wor?= =?UTF-8?q?kflows=20=F0=9F=99=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{actions => workflows}/publish_release.yml | 0 .github/{actions => workflows}/test.yml | 0 .github/{actions => workflows}/version_bump.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .github/{actions => workflows}/publish_release.yml (100%) rename .github/{actions => workflows}/test.yml (100%) rename .github/{actions => workflows}/version_bump.yml (100%) diff --git a/.github/actions/publish_release.yml b/.github/workflows/publish_release.yml similarity index 100% rename from .github/actions/publish_release.yml rename to .github/workflows/publish_release.yml diff --git a/.github/actions/test.yml b/.github/workflows/test.yml similarity index 100% rename from .github/actions/test.yml rename to .github/workflows/test.yml diff --git a/.github/actions/version_bump.yml b/.github/workflows/version_bump.yml similarity index 100% rename from .github/actions/version_bump.yml rename to .github/workflows/version_bump.yml