-
Notifications
You must be signed in to change notification settings - Fork 49
35 lines (34 loc) · 1.06 KB
/
deploy.yml
File metadata and controls
35 lines (34 loc) · 1.06 KB
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
33
34
35
name: Deploy
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.beta[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@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: true
- name: Check Playwright::version
run: bundle exec ruby -e 'raise "invalid Playwright::VERSION" unless Playwright::VERSION == ENV["RELEASE_TAG"]'
- name: Generate API codes and build
run: |
bundle exec ruby development/generate_api.rb
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/playwright-ruby-client-$RELEASE_TAG.gem