-
Notifications
You must be signed in to change notification settings - Fork 9
29 lines (27 loc) · 944 Bytes
/
release.yml
File metadata and controls
29 lines (27 loc) · 944 Bytes
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
name: Release built gem on tag-push
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: gem update --system 3.4.22 # The latest of Ruby 2.x support
- run: bundle exec rake build
- id: gem
run: echo "result=$(find pkg -name 'deploygate-*.gem' -type f | head -1)" >> $GITHUB_OUTPUT
- run: |
gem push '${{ steps.gem.outputs.result }}'
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
- uses: slackapi/slack-github-action@v1.16.0
with:
payload: "{\"text\": \"Released a deploygate gem in <https://rubygems.org/gems/deploygate/|RubyGems>\"}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SHARED_FOR_RELEASE_ARTIFACT_SLACK_INCOMING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK