-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from Mogztter/release-ruby
- Loading branch information
Showing
3 changed files
with
69 additions
and
33 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
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,59 @@ | ||
name: Release Ruby | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'ruby-v*' # Push events to matching ruby-v*, i.e. ruby-v1.0, ruby-v2.1.3 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- run: bundle install | ||
working-directory: ./ruby | ||
- run: bundle exec rake | ||
working-directory: ./ruby | ||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- name: Install and test | ||
run: | | ||
bundle install | ||
bundle exec rake | ||
working-directory: ./ruby | ||
- name: Configure credentials | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > $HOME/.gem/credentials | ||
env: | ||
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
- name: Build gem | ||
run: | | ||
bundle exec rake build | ||
working-directory: ./ruby | ||
- name: Publish to rubygems.org | ||
run: | | ||
gem push pkg/asciidoctor-kroki-${GITHUB_REF#refs/tags/ruby-v}.gem | ||
working-directory: ./ruby | ||
# create the GitHub release | ||
- name: Create release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false |
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,9 +1,16 @@ | ||
# Release | ||
|
||
How to perform a release: | ||
How to perform a release. | ||
|
||
**Ruby:** | ||
|
||
1. Update the version number `s.version` in `ruby/asciidoctor-kroki.gemspec` | ||
2. Run `bundle exec rake` in the `ruby` directory to make sure that everything is working | ||
3. Commit both `asciidoctor-kroki.gemspec` and `Gemfile.lock` files | ||
4. Run `npm version x.y.z` at the root of the repository | ||
4. Create a tag starting with `ruby-v` (eg. `ruby-v1.2.3`) | ||
5. Push your changes with the tag: git push origin master --tags | ||
|
||
**JavaScript:** | ||
|
||
1. Run `npm version x.y.z` at the root of the repository | ||
2. Push your changes with the tag: git push origin master --tags |