From 2ddaac2f2ab6dbb71816ac332cd28d6311843848 Mon Sep 17 00:00:00 2001 From: Matt Lewis <34316418+mattl3w1s@users.noreply.github.com> Date: Mon, 30 Mar 2026 15:29:44 +0000 Subject: [PATCH] [CSTONEG-62]: add GitHub Actions release workflow Signed-off-by: Matt Lewis <34316418+mattl3w1s@users.noreply.github.com> --- .github/workflows/release.yaml | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..2c807f0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release +on: + push: + branches: [main] + workflow_dispatch: +jobs: + version-check: + runs-on: ubuntu-latest + outputs: + changed: ${{ steps.check.outputs.any_changed }} + steps: + - uses: actions/checkout@v4 + - name: Check if version has been updated + id: check + uses: tj-actions/changed-files@v44 + with: + files: lib/sift/version.rb + release: + runs-on: ubuntu-latest + needs: version-check + if: ${{ github.event_name == 'workflow_dispatch' || needs.version-check.outputs.changed == 'true' }} + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2 + bundler-cache: true + - name: Build gem file + run: bundle exec rake build + - uses: fac/ruby-gem-setup-credentials-action@v2 + with: + user: "" + key: rubygems + token: ${{ secrets.RUBY_GEMS_API_KEY }} + - uses: fac/ruby-gem-push-action@v2 + with: + key: rubygems