Skip to content

Commit 449db5d

Browse files
authored
chore: Add semantic-release (#58)
1 parent bbc8ae1 commit 449db5d

8 files changed

Lines changed: 6633 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Gem release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
11+
- uses: actions/setup-node@v5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
12+
with:
13+
node-version: 20
14+
- uses: ruby/setup-ruby@v8a45918450651f5e4784b6031db26f4b9f76b251
15+
with:
16+
ruby-version: '3.2' # Not needed with a .ruby-version file
17+
18+
- name: Install dependencies
19+
run: npm install && bundle install
20+
21+
- name: Build and validate gem
22+
run: gem build
23+
24+
- name: Semantic Release
25+
uses: cycjimmy/semantic-release-action@75aba232a0230253df6bf4f7beb4376debf5cefb
26+
env:
27+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ test/version_tmp
2222
/phrase
2323
.rspec
2424
/locales
25+
node_modules

RELEASING.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# Release
1+
# :package: Releasing
22

3-
1. Bump the version to the desired number in lib/phraseapp-in-context-editor-ruby/version.rb. Make sure you're following semantic versioning.
4-
2. Run `bundle` and commit Gemfile.lock including the new version of the gem
5-
3. Make sure the tests pass
6-
4. Tag the new version on GitHub
7-
5. Update the CHANGELOG by running `$ github_changelog_generator` and commit the new `CHANGELOG`
8-
6. Build the gem by running `gem build phraseapp-in-context-editor-ruby.gemspec`
9-
7. Push the gem to Rubygems by running `gem push phraseapp-in-context-editor-ruby-<VERSION>.gem`
10-
8. Done!
3+
Package is being released automatically with the use of [Semantic Release Action](https://github.com/marketplace/actions/action-for-semantic-release). Just push a commit to the main and a new version will be released right away!
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module PhraseApp
2+
VERSION = "2.0.0"
3+
end

0 commit comments

Comments
 (0)