From 9a46df19853d0b898df9582ae73c9e8b82f064ed Mon Sep 17 00:00:00 2001 From: Chris Keele Date: Wed, 29 May 2024 18:02:24 -0500 Subject: [PATCH] Prepare to release pre-release version to validate handoff. --- .github/workflows/publish-package.yml | 68 +++++++++++++++++++++++++++ .github/workflows/release.yml | 34 -------------- .github/workflows/test-matrix.yml | 8 ++-- .github/workflows/test-status.yml | 4 +- .github/workflows/test-suite.yml | 14 +++--- VERSION | 2 +- 6 files changed, 82 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/publish-package.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 0000000..d9114b8 --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -0,0 +1,68 @@ +name: Publish ❯ Package + +on: + # push: + # tags: + # - "v*" + workflow_dispatch: {} + +jobs: + hex: + runs-on: ${{ vars.PREFERRED_OS }} + name: Publishing Package + + env: + HEX_API_KEY: ${{ secrets.HEX_API_KEY }} + MIX_ENV: prod + + steps: + - uses: actions/checkout@v2 + + - name: Install Erlang & Elixir + id: beam-versions + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{ vars.PREFERRED_ELIXIR }} + otp-version: ${{ vars.PREFERRED_OTP }} + + - name: Restore mix dependency installation cache + id: mix-deps-get-cache + uses: actions/cache@v4 + with: + path: deps + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + + - name: Install mix dependencies + if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' + run: mix deps.get + + - name: Restore mix dependency compilation cache + id: mix-deps-compile-cache + uses: actions/cache@v4 + with: + path: _build + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + + - name: Compile mix dependencies + if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' + run: mix deps.compile + + - name: Publish package to hex.pm + run: mix hex.publish --yes + + results: + name: Publish Package Results + runs-on: ${{ vars.PREFERRED_OS }} + + if: ${{ always() }} + needs: + - hex + + steps: + - name: Test Status Succeeded + if: ${{ needs.hex.result == 'success' }} + run: exit 0 + + - name: Test Status Failed + if: ${{ needs.hex.result == 'failure' }} + run: exit 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 34116d6..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release - -on: - # push: - # tags: - # - '*' - workflow_dispatch: {} - -jobs: - release: - runs-on: ubuntu-latest - name: Release - strategy: - matrix: - otp: [23] - elixir: [1.11.0] - env: - HEX_API_KEY: ${{ secrets.HEX_API_KEY }} - steps: - - uses: actions/checkout@v2 - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} - - name: Restore dependencies cache - uses: actions/cache@v2 - with: - path: deps - key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-release-deps-${{ hashFiles('**/mix.lock') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-release-deps-${{ hashFiles('**/mix.lock') }} - ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-release-deps - - run: mix deps.get - - run: mix hex.publish --yes diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index 22676be..8cf8d35 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -228,7 +228,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' @@ -430,7 +430,7 @@ jobs: path: | deps mix.lock - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} - name: Install mix dependencies if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' @@ -441,7 +441,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' @@ -452,7 +452,7 @@ jobs: uses: actions/cache@v4 with: path: priv/plts - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-typecheck + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-typecheck - name: Setup typechecking if: steps.mix-typecheck-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/test-status.yml b/.github/workflows/test-status.yml index e7110d8..c02461f 100644 --- a/.github/workflows/test-status.yml +++ b/.github/workflows/test-status.yml @@ -48,7 +48,7 @@ jobs: path: | deps mix.lock - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} - name: Install mix dependencies if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' @@ -59,7 +59,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 4976f9f..540aa5a 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -36,7 +36,7 @@ jobs: path: | deps mix.lock - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-exs-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.exs')) }} - name: Install mix dependencies if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' @@ -47,7 +47,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' @@ -77,7 +77,7 @@ jobs: uses: actions/cache@v4 with: path: deps - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Install mix dependencies if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' @@ -88,7 +88,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' @@ -99,7 +99,7 @@ jobs: uses: actions/cache@v4 with: path: priv/plts - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-mix-typecheck + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-typecheck - name: Setup typechecking if: steps.mix-typecheck-cache.outputs.cache-hit != 'true' @@ -127,7 +127,7 @@ jobs: uses: actions/cache@v4 with: path: deps - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Install mix dependencies if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' @@ -138,7 +138,7 @@ jobs: uses: actions/cache@v4 with: path: _build - key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + key: cache-${{ vars.CACHE_VERSION }}-os-${{ runner.os }}-otp-${{ steps.beam-versions.outputs.otp-version }}-elixir-${{ steps.beam-versions.outputs.elixir-version }}-env-${{ env.MIX_ENV }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Compile mix dependencies if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' diff --git a/VERSION b/VERSION index a53741c..29e1c5c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.6 \ No newline at end of file +0.2.6-handoff