-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
4 changed files
with
91 additions
and
22 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,71 @@ | ||
name: tag-and-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: 'lib/*/version.rb' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@main | ||
|
||
- name: Set up Ruby 2.6 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.x | ||
|
||
- name: Get version | ||
id: get_version | ||
run: | | ||
version_file=$(find ./lib -name version.rb) | ||
version=$(grep VERSION $version_file |cut -f 2 -d= |tr -d \'|tr -d [:space:]) | ||
echo ::set-output name=version::$version | ||
echo ::set-output name=version_tag::v$version | ||
- name: Tag commit | ||
uses: tvdias/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
tag: "${{steps.get_version.outputs.version_tag}}" | ||
|
||
- name: Upload to Rubygems | ||
env: | ||
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: | | ||
set +e | ||
mkdir -p ~/.gem | ||
touch ~/.gem/credentials | ||
chmod 600 ~/.gem/credentials | ||
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >> ~/.gem/credentials | ||
gemspec=$(ls *gemspec* | head -1) | ||
gem build $gemspec | ||
gem_name=$(ls -t *.gem | head -1) | ||
output=$(gem push *.gem) | ||
if [[ $output != *"Successfully"* ]]; then | ||
echo "Error uploading to Rubygems: $output" | ||
rm -f ~/.gem/credentials | ||
exit 1 | ||
else | ||
echo "Successfully uploaded to Rubygems: $output" | ||
rm -f ~/.gem/credentials | ||
fi | ||
- name: Extract from changelog | ||
id: extract_changes | ||
run: | | ||
# Must use a temporary file or it loses the formatting | ||
VERSION=${{steps.get_version.outputs.version}}; awk "/## \[$VERSION\]/{flag=1;next}/## \[/{flag=0}flag" CHANGELOG.md > REL-BODY.md | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{steps.get_version.outputs.version_tag}} | ||
artifacts: "*.gem, CHANGELOG.md" | ||
bodyFile: "REL-BODY.md" | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,30 +1,42 @@ | ||
# Changelog | ||
|
||
## [2.2.1] | ||
|
||
- Switch release to github actions | ||
|
||
## [2.2.0] | ||
- Add `==` to `Feature` and `Conditions` | ||
|
||
- Add `==` to `Feature` and `Conditions` | ||
|
||
## [2.1.0] | ||
- Add `features` parameter to `EightBall.marshall` to allow marshalling any Features, not just the ones | ||
|
||
- Add `features` parameter to `EightBall.marshall` to allow marshalling any Features, not just the ones | ||
from the configured Provider. | ||
|
||
## [2.0.0] | ||
- [BREAKING] `Parsers` have been replaced with `Marshallers`, allowing bi-directional conversions | ||
- Added `EightBall.marshall` as a way to output the Feature list to an external format (e.g. to create a JSON file) | ||
- Added `EightBall.features` as a shortcut to `EightBall.provider.features` | ||
- Testing framework has been moved from Minitest to rspec | ||
- Updated dev dependencies | ||
|
||
- [BREAKING] `Parsers` have been replaced with `Marshallers`, allowing bi-directional conversions | ||
- Added `EightBall.marshall` as a way to output the Feature list to an external format (e.g. to create a JSON file) | ||
- Added `EightBall.features` as a shortcut to `EightBall.provider.features` | ||
- Testing framework has been moved from Minitest to rspec | ||
- Updated dev dependencies | ||
|
||
## [1.0.5] | ||
|
||
Security: Update rake to >= 12.3.3 | ||
|
||
## [1.0.3] | ||
|
||
Update .travis.yml | ||
|
||
## [1.0.2] | ||
|
||
Update .travis.yml | ||
|
||
## [1.0.1] | ||
|
||
Security: Update yard 0.9.16 -> 0.9.20 | ||
|
||
## [1.0.0] | ||
|
||
Initial release! |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module EightBall | ||
VERSION = '2.2.0' | ||
VERSION = '2.2.1' | ||
end |