From 497ffa852a79c77aacc2548c5c42b2ce1fabe54a Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Wed, 13 Nov 2024 18:07:19 +0100 Subject: [PATCH] exlir: Enable release (#72) --- .github/workflows/release-hex.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/test-elixir.yml | 24 +++++++----------------- 2 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/release-hex.yaml diff --git a/.github/workflows/release-hex.yaml b/.github/workflows/release-hex.yaml new file mode 100644 index 000000000..053ad0728 --- /dev/null +++ b/.github/workflows/release-hex.yaml @@ -0,0 +1,28 @@ +name: Release Elixir hex package + +on: + push: + branches: [release/*] + +jobs: + create-hex-release: + name: Publish to hex.pm + runs-on: ubuntu-latest + environment: Release + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - uses: erlef/setup-beam@v1 + with: + otp-version: '27.1' + elixir-version: '1.17' + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + + - uses: cucumber/action-publish-hex@v1.0.0 + with: + hex-api-key: ${{ secrets.HEX_API_KEY }} + working-directory: 'elixir' diff --git a/.github/workflows/test-elixir.yml b/.github/workflows/test-elixir.yml index 29afe6bee..77003152b 100644 --- a/.github/workflows/test-elixir.yml +++ b/.github/workflows/test-elixir.yml @@ -11,27 +11,17 @@ on: workflow_call: jobs: - tests: - name: Run Tests + test-elixir: runs-on: ubuntu-latest - strategy: - matrix: - include: - - otp: '26.0' - elixir: '1.15' - - otp: '27.1' - elixir: '1.17' - env: - MIX_ENV: test - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: ${{ matrix.otp }} - elixir-version: ${{ matrix.elixir }} - - - run: mix deps.get + otp-version: '27.1' + elixir-version: '1.17' + - run: | + mix deps.get working-directory: elixir - run: mix test @@ -39,4 +29,4 @@ jobs: - name: run acceptance tests run: make acceptance - working-directory: elixir \ No newline at end of file + working-directory: 'elixir'