Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,11 @@ on:
branches:
- main
jobs:
postgres:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', '3.1']
gemfile:
- rails_7
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true

services:
postgres:
image: postgres:12
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
Expand All @@ -36,7 +26,6 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: default
bundler-cache: true
rubygems: "3.4.4"
Expand Down
57 changes: 32 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,45 @@ on:
- main

jobs:
release-please:
release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
- uses: actions/checkout@v4
with:
release-type: ruby
package-name: pager_tree-integrations
bump-minor-pre-major: true
version-file: "lib/pager_tree/integrations/version.rb"
# Checkout code if release was created
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
# Setup ruby if a release was created
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
if: ${{ steps.release.outputs.release_created }}
# Bundle install
- run: bundle install
if: ${{ steps.release.outputs.release_created }}
# Publish
- name: publish gem
bundler-cache: true

- name: Setup RubyGems credentials
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
env:
RUBYGEMS_AUTH_TOKEN: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}

- name: Release
env:
# Make sure to update the secret name
# if yours isn't named RUBYGEMS_AUTH_TOKEN
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
if: ${{ steps.release.outputs.release_created }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
npx --yes
-p semantic-release
-p @semantic-release/commit-analyzer
-p @semantic-release/release-notes-generator
-p @semantic-release/changelog
-p @semantic-release/exec
-p @semantic-release/git
-p @semantic-release/github
semantic-release
23 changes: 23 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }],
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/VERSION = \"[^\"]*\"/VERSION = \"${nextRelease.version}\"/' lib/pager_tree/integrations/version.rb && bundle install && sed -i '/^[[:space:]]*pager_tree-integrations ([^)]*)[[:space:]]*$/d' Gemfile.lock",
"publishCmd": "gem build *.gemspec && gem push *.gem"
}
],
Comment thread
Copilot marked this conversation as resolved.
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "lib/pager_tree/integrations/version.rb", "Gemfile.lock"],
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
],
"@semantic-release/github"
]
}
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.4.9
8 changes: 0 additions & 8 deletions Appraisals

This file was deleted.

7 changes: 2 additions & 5 deletions CREATING_AN_INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@ Input options to the user during create and update (think API keys, options, ect
```

#### File Upload input option
Requires `has_one_attached :option_attachment` (or `has_many_attached` for multiple files) on the model.
```html
<div class="form-group">
<%= form.label :option_welcome_media %>
<%= form.file_field :option_welcome_media, accept: "audio/*", class: "file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-gray-50 file:text-gray-700 hover:file:bg-gray-100" %>
<p class="form-hint"><%== t(".option_welcome_media_hint_html") %></p>
</div>
<%= render "shared/attachments_field", form: form, field: :option_attachment, accept: "audio/*", hint: t(".option_attachment_hint_html") %>
```
Comment on lines 54 to 58

#### Check Box input option
Expand Down
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ gemspec

gem "sprockets-rails"

gem "appraisal", "~> 2.4"
gem "rails", "~> 7.1"
gem "csv"

group :development, :test do
gem "dotenv-rails", "~> 2.7" # .env files
# Start debugger with binding.b [https://github.com/ruby/debug]
gem "debug", ">= 1.0.0"
gem "standard", "1.12.0"
gem "standard"
gem "vcr", "~> 6.0"
end

gem "pg", "~> 1.3"

# integration dependencies
gem "aws-sdk-sns", "~> 1.53"
gem "deferred_request", "~> 1.0.4"
gem "deferred_request", "~> 2.0"
gem "httparty", "~> 0.20.0"
gem "jmespath", "~> 1.0"
gem "sanitize", "~> 6.0"
Expand Down
Loading