Skip to content

Commit 4f3516f

Browse files
authored
Merge pull request #10 from gi/main
v0.3.0
2 parents 57259f9 + 4d412d6 commit 4f3516f

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
paths:
8-
- lib/**/version
97

108
permissions:
119
contents: write
@@ -14,6 +12,7 @@ permissions:
1412
jobs:
1513
github:
1614
name: GitHub
15+
needs: tag
1716
runs-on: ubuntu-latest
1817
steps:
1918
- name: Checkout
@@ -26,9 +25,11 @@ jobs:
2625
- name: Publish to GitHub
2726
env:
2827
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
28+
RUBYGEMS_HOST: https://rubygems.pkg.github.com/${{github.repository_owner}}
2929
run: bin/release
3030
rubygems:
3131
name: RubyGems
32+
needs: tag
3233
runs-on: ubuntu-latest
3334
steps:
3435
- name: Checkout
@@ -42,3 +43,16 @@ jobs:
4243
env:
4344
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_TOKEN}}"
4445
run: bin/release
46+
tag:
47+
name: Git Tag
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
- name: Install
53+
uses: ruby/setup-ruby@v1
54+
with:
55+
ruby-version: ruby-3
56+
bundler-cache: true
57+
- name: Tag
58+
run: bin/tag

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.0] - 2022-01-31
11+
1012
### Added
1113
- `initialize`: add path parameter ([#5](https://github.com/gi/handlebars-ruby/pull/5))
1214
- `register_helper`: accept multiple helpers as keyword parameters ([#6](https://github.com/gi/handlebars-ruby/pull/6))
1315
- `register_helper`: accept javascript function as string ([#7](https://github.com/gi/handlebars-ruby/pull/7))
1416
- `ci`: verify gem builds ([#8](https://github.com/gi/handlebars-ruby/pull/8))
1517
- `require`: allow loading from `handlebars-engine` and `handlebars/engine` ([#8](https://github.com/gi/handlebars-ruby/pull/8))
1618

17-
### Changed
18-
1919
## [0.2.0] - 2022-01-27
2020

2121
This is the initial implementation, wrapping the JavaScript Handlebars.

bin/tag

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
dir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
4+
5+
branch=$(git rev-parse --abbrev-ref HEAD)
6+
7+
if [[ "${branch}" != "main" ]]; then
8+
echo "Releases are restricted to the main branch."
9+
exit 1
10+
fi
11+
12+
diff=$(git diff HEAD --quiet; echo $?)
13+
14+
if [[ "${diff}" != "0" ]]; then
15+
echo "Releases are restricted to clean branches."
16+
exit 1
17+
fi
18+
19+
if [[ -n "${CI}" ]]; then
20+
git config --global user.email "gi+handlebars-ruby@users.noreply.github.com"
21+
git config --global user.name "handlebars-ruby"
22+
git fetch --tags
23+
fi
24+
25+
"${dir}/rake" release:source_control_push

lib/handlebars/engine/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module Handlebars
44
class Engine
5-
VERSION = "0.2.0"
5+
VERSION = "0.3.0"
66
end
77
end

0 commit comments

Comments
 (0)