-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.62 KB
/
release.yml
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: OpenC3 Release
on:
workflow_dispatch:
inputs:
version:
description: "Version string"
required: true
type: string
jobs:
release:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Publish Gems Rubygems.org
run: |
rake build VERSION=${{ github.event.inputs.version }}
gem push openc3-cosmos-fakesat-${{ github.event.inputs.version }}.gem
env:
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
- name: Publish Gems Github
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GITHUB_TOKEN}\n" > $HOME/.gem/credentials
gem push --key github --host https://rubygems.pkg.github.com/openc3 openc3-cosmos-fakesat-${{ github.event.inputs.version }}.gem
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: create tag for release
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
git_commit_sha: ${{ github.sha }}
version: ${{ github.event.inputs.version }}
git_tag_prefix: "v"