OpenC3 Release #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |