From 1f2325957441e9ad4d936357f90ff4da9e0dbc4a Mon Sep 17 00:00:00 2001 From: Peter Yates Date: Tue, 3 Oct 2023 13:52:55 +0100 Subject: [PATCH 1/2] Ignore .gem files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bd3c66c..28f43f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ docs/node_modules docs/_site +*.gem From 6892464390aa01067547221187971d5e2264a255 Mon Sep 17 00:00:00 2001 From: Peter Yates Date: Tue, 3 Oct 2023 13:53:12 +0100 Subject: [PATCH 2/2] Add publish action This action will automatically push a gem to both Rubygems and GitHub package registry when called. I've left it as a manual action to kick off for now, but it can be fully automated with this snippet later if necessary: ``` on: push: tags: - '*' ``` https://github.com/dawidd6/action-publish-gem --- .github/workflows/publish-gem.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/publish-gem.yml diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml new file mode 100644 index 0000000..2b0277b --- /dev/null +++ b/.github/workflows/publish-gem.yml @@ -0,0 +1,17 @@ +name: Publish +on: + workflow_dispatch: + inputs: + tag: + description: Tag + required: true +jobs: + publish: + name: Publish to RubyGems.org and GitHub Packages + runs-on: ubuntu-20.04 + steps: + - name: Publish gem + uses: dawidd6/action-publish-gem@v1 + with: + api_key: ${{ secrets.RUBYGEMS_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }}