From 01b9fb8b7be841780a5a635aca3adde012e04433 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Fri, 13 Dec 2024 02:36:08 +0100 Subject: [PATCH] chore: Add release workflow * Release gem from GH Actions using trusted publisher * Create GH release from changelog --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 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..943fd4c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: release + +on: + push: + tags: + - v* + +jobs: + rubygems: + if: github.repository == 'mnemosyne-mon/mnemosyne-ruby' + runs-on: ubuntu-24.04 + + permissions: + contents: write + id-token: write + + env: + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 10 + BUNDLE_WITHOUT: development test + + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby + bundler-cache: true + + - uses: rubygems/release-gem@v1 + + - uses: taiki-e/create-gh-release-action@v1 + with: + changelog: CHANGELOG.md + draft: true + token: ${{ secrets.GITHUB_TOKEN }}