Skip to content

Commit

Permalink
[#107] Release workflow (#109)
Browse files Browse the repository at this point in the history
* [#107] Release workflow

* small fixes

* fix auto merge
  • Loading branch information
jonhue committed Oct 10, 2019
1 parent 87fc798 commit 2b5250a
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
minApprovals:
OWNER: 1
MEMBER: 1
COLLABORATOR: 1
requiredLabels:
- merge
reportStatus: true
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/setup-ruby@v1
with:
version: 2.6.x

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
OWNER: jonhue

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

This file tracks all unreleased breaking changes and deprecations on `master`. You can find a list of all releases [here](https://github.com/jonhue/acts_as_favoritor/releases).

acts_as_favoritor follows Semantic Versioning 2.0 as defined at http://semver.org.

### Breaking Changes

* None

### Deprecated

* None
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# acts_as_favoritor

[![Gem Version](https://badge.fury.io/rb/acts_as_favoritor.svg)](https://badge.fury.io/rb/acts_as_favoritor) ![Travis](https://travis-ci.org/jonhue/acts_as_favoritor.svg?branch=master)

acts_as_favoritor is a Rubygem to allow any ActiveRecord model to associate any other model including the option for multiple relationships per association with scopes.

You are able to differentiate followers, favorites, watchers, votes and whatever else you can imagine through a single relationship. This is accomplished by a double polymorphic relationship on the Favorite model. There is also built in support for blocking/un-blocking favorite records as well as caching.
Expand All @@ -20,6 +18,7 @@ You are able to differentiate followers, favorites, watchers, votes and whatever
* [Caching](#caching)
* [Configuration](#configuration)
* [Testing](#testing)
* [Release](#release)
* [To do](#to-do)
* [Contributing](#contributing)
* [Semantic versioning](#semantic-versioning)
Expand Down Expand Up @@ -279,6 +278,17 @@ end

---

## Release

1. Review breaking changes and deprecations in `CHANGELOG.md`
2. Change the gem version in `acts_as_favoritor.gemspec`
3. Reset `CHANGELOG.md`
4. Create a pull request to merge the changes into `master`
5. After the pull request was merged, create a new release listing the breaking changes and commits on `master` since the last release.
6. The release workflow will publish the gems to RubyGems and the GitHub Package Registry

---

## To do

We use [GitHub projects](https://github.com/jonhue/acts_as_favoritor/projects/1) to coordinate the work on this project.
Expand Down

0 comments on commit 2b5250a

Please sign in to comment.