-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (35 loc) · 1.04 KB
/
deploy.yml
File metadata and controls
42 lines (35 loc) · 1.04 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
36
37
38
39
40
41
42
name: Deploy SDK
on:
release:
types:
- published
jobs:
deploy:
name: Deploy to Rubygems
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'master' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
- name: Install Packages
run: bundle install
- name: Test
run: rake
- name: Deploy to Rubygems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
- uses: Bandwidth/build-notify-slack-action@v2
if: always()
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}