-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (42 loc) · 1.23 KB
/
CD.yaml
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
43
44
45
46
47
48
49
50
51
name: Continuous Deployment
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
publish-shipengine-gem:
runs-on: ubuntu-latest
steps:
- name: Release Please
id: release
uses: google-github-actions/release-please-action@v3
with:
release-type: ruby
package-name: shipengine_sdk
bump-minor-pre-major: true
version-file: lib/shipengine/version.rb
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
if: ${{ steps.release.outputs.release_created }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
if: ${{ steps.release.outputs.release_created }}
- name: Install project dependencies
run: bundle install
if: ${{ steps.release.outputs.release_created }}
- name: Publish ShipEngine Gem
if: ${{ steps.release.outputs.release_created }}
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
cat <<EOF >$HOME/.gem/credentials
---
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
EOF
rake release