Skip to content

Commit

Permalink
Merge pull request #15 from vinted/feature/release-shopify-gem
Browse files Browse the repository at this point in the history
Use shopify fork
  • Loading branch information
tomasv authored Apr 5, 2024
2 parents a553ff0 + ef2af1e commit 6bc9f25
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 28 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build_release_pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and release ruby gem

on:
pull_request:
branches: [ 1-0-stable ]
push:
workflow_dispatch:

jobs:
build-release-pipeline:
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get update
sudo apt-get -y install memcached libsasl2-dev
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true

- run: bundle exec ruby test/setup.rb
- run: bundle exec rake
- name: Build
id: build
if: success()
run: |
bundle exec rake build
echo "::set-output name=gem_version::v$(bundle exec rake version)"
- name: Release
if: success() && github.ref == 'refs/heads/1-0-stable'
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push pkg/vinted-memcached-*.gem -V
env:
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"

- name: Tag repo with new gem version
if: success() && github.ref == 'refs/heads/1-0-stable'
uses: actions/github-script@v3
with:
github-token: ${{ github.token }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ steps.build.outputs.gem_version }}",
sha: context.sha
})
24 changes: 0 additions & 24 deletions .github/workflows/ci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
memcached (1.9.0)
vinted-memcached (1.8.5)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -38,13 +38,13 @@ DEPENDENCIES
activesupport
dalli
memcache-client
memcached!
mocha
rake
rake-compiler
remix-stash (~> 1.1.3)
stackprof
test-unit
vinted-memcached!

BUNDLED WITH
2.1.4
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ def run(cmd, reason)
puts cmd
raise "'#{cmd}' failed" unless system(cmd)
end

task :version do
require 'memcached/version'
puts Memcached::VERSION
end
3 changes: 3 additions & 0 deletions lib/memcached/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Memcached
VERSION = '1.8.5'
end
6 changes: 4 additions & 2 deletions memcached.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# -*- encoding: utf-8 -*-

require_relative 'lib/memcached/version'

Gem::Specification.new do |s|
s.name = "memcached"
s.version = "1.9.0"
s.name = "vinted-memcached"
s.version = Memcached::VERSION

s.authors = ["Arthur Neves", "Evan Weaver"]
s.email = "[email protected]"
Expand Down

0 comments on commit 6bc9f25

Please sign in to comment.