Support GET Entity Counts Endpoint #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Gem | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: update version | |
run: sed -i -r "s/VERSION = \"[0-9a-z.-]+\"\$/VERSION = \"${GITHUB_REF#refs/*/}\"/g" lib/adzerk/version.rb | |
- name: push updated version | |
run: | | |
git config --global user.name 'Kevel CI' | |
git config --global user.email '[email protected]' | |
if git commit -am "Bump version to ${GITHUB_REF#refs/*/}"; then | |
git tag --force ${GITHUB_REF#refs/*/} | |
git push | |
git push --tags --force | |
fi | |
env: | |
GITHUB_TOKEN: ${{secrets.REPO_READ_TOKEN}} | |
- name: set up ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
- name: create credentials folder | |
run: mkdir -p ~/.gem | |
- name: create credentials file | |
run: | | |
cat << EOF >> ~/.gem/credentials | |
--- | |
:rubygems_api_key: ${{secrets.RUBYGEMS_API_KEY}} | |
EOF | |
chmod 0600 ~/.gem/credentials | |
- name: update bundler | |
run: gem update bundler | |
- name: install dependencies | |
run: bundle install | |
- name: build gem | |
run: bundle exec rake build | |
- name: publish gem | |
run: gem push ./pkg/adzerk-${GITHUB_REF#refs/*/}.gem |