-
-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (24 loc) · 797 Bytes
/
release.yml
File metadata and controls
26 lines (24 loc) · 797 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
name: Release
on:
release:
types: [ created ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
- name: Publish Gems
run: |
CONFIG=${HOME}/.gem/credentials
mkdir -p ${HOME}/.gem && touch ${CONFIG} && chmod 0600 ${CONFIG}
echo "---" > ${CONFIG}
echo ":github: ${GITHUB_TOKEN}" >> ${CONFIG}
echo ":rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}" >> ${CONFIG}
gem build *.gemspec
gem push *.gem
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GITHUB_TOKEN: "Bearer ${{ secrets.GITHUB_TOKEN }}"
OWNER: ${{ github.repository_owner }}
RUBYGEMS_AUTH_TOKEN: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"