Skip to content

Bump actionmailer from 7.2.1 to 7.2.1.1 #46

Bump actionmailer from 7.2.1 to 7.2.1.1

Bump actionmailer from 7.2.1 to 7.2.1.1 #46

Workflow file for this run

name: Run Tests and Publish
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.3
- name: Build and test with Rake
run: |
gem install bundler
bundle install --jobs 4 --retry 3
cp spec/dummy/config/cloudinary.yml.example spec/dummy/config/cloudinary.yml
sed -i s/CLOUD_NAME/${{ secrets.CLOUDINARY_DEV_CLOUD_NAME }}/g spec/dummy/config/cloudinary.yml
sed -i s/API_KEY/${{ secrets.CLOUDINARY_DEV_API_KEY }}/g spec/dummy/config/cloudinary.yml
sed -i s/API_SECRET/${{ secrets.CLOUDINARY_DEV_API_SECRET }}/g spec/dummy/config/cloudinary.yml
bundle exec rake spec
gem build attachinary.gemspec
- name: Publish gem
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
bundle config rubygems.pkg.github.com reverb-deploy-bot:${{ secrets.GITHUB_TOKEN }}
bundle config set frozen true
bundle install
CURRENT_VERSION=$(bundle info attachinary --version)
set +e
mkdir -p ~/.gem
echo -e "---\n:github: Bearer ${{ secrets.PACKAGE_PULL_TOKEN }}" >> ~/.gem/credentials
VERSION_MATCH=$(gem search attachinary -s https://${{ secrets.GITHUB_TOKEN }}@rubygems.pkg.github.com/reverbdotcom | grep -c $CURRENT_VERSION)
set -e
if [ $VERSION_MATCH -ne 0 ]; then
echo "Version already exists! No need to publish"
exit 0
fi
gem build attachinary.gemspec
chmod 0600 ~/.gem/credentials
gem push --key github --host https://rubygems.pkg.github.com/reverbdotcom attachinary*.gem