-
-
Notifications
You must be signed in to change notification settings - Fork 41
32 lines (30 loc) · 939 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.alpha[0-9]+'
jobs:
push_to_rubygems:
name: Push to RubyGems
runs-on: ubuntu-latest
steps:
- name: Set RELEASE_TAG
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true
- name: Check Puppeteer::VERSION
run: bundle exec ruby -e 'raise "invalid Puppeteer::VERSION" unless Puppeteer::VERSION == ENV["RELEASE_TAG"]'
- run: rake build
- name: setup API key
run: |
mkdir -p ~/.gem/
echo "---" > ~/.gem/credentials
echo ":rubygems_api_key: $RUBYGEMS_API_KEY" >> ~/.gem/credentials
chmod 600 ~/.gem/credentials
env:
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- run: gem push pkg/puppeteer-ruby-$RELEASE_TAG.gem