This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rony Xavier
committed
Jan 14, 2021
1 parent
1480de8
commit 6be9207
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Draft Release | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
|
||
jobs: | ||
draft_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: toolmantim/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release Management | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release to gem hosts and docker registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup ruby | ||
uses: actions/setup-ruby@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
- run: git fetch origin +refs/tags/*:refs/tags/* | ||
- name: Setup credentials and versioning | ||
run: | | ||
gem install git-lite-version-bump keycutter roo | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials | ||
printf -- ":github: Bearer ${GPR_API_KEY}\n" >> $HOME/.gem/credentials | ||
env: | ||
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} | ||
GPR_API_KEY: ${{secrets.GITHUB_TOKEN}} | ||
- name: Build gem | ||
run: rake build_release | ||
- name: Get gem version | ||
run: echo "::set-env name=VERSION::$(ls *.gem | grep -Po '(\d+.)+\d+')" | ||
- name: Publish to RubyGems | ||
run: | | ||
gem push --KEY rubygems --host https://rubygems.org *.gem | ||
- name: Publish to GPR | ||
run: | | ||
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | ||
env: | ||
OWNER: mitre |
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