From 097c2f9bf711632814ad7a8fb698727c85f8fe21 Mon Sep 17 00:00:00 2001 From: benk-gc Date: Tue, 9 Jul 2024 11:43:44 +0100 Subject: [PATCH] Add release action for Gem publishing. Currently we don't release gem versions to our internal package registry, and some codebases even subscribe directly to master on GitHub. This action allows us to publish proper releases as with our other gems, so we can have better management of breaking changes. --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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..7311ead --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Publish gem to GitHub package registry + +on: + push: + tags: + - v* + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: gocardless/github-actions/actions/ruby-bundle-install@master + with: + known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }} + robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }} + token: ${{ secrets.GITHUB_TOKEN }} + - name: Publish Gem + uses: gocardless/github-actions/actions/publish-internal-gem@master + with: + token: ${{ secrets.GITHUB_TOKEN }}