Skip to content

Commit

Permalink
add gem-deploy gh action (#45)
Browse files Browse the repository at this point in the history
* add gem-deploy gh action

* move to version 6.0.1 to avoid conflicts with already exisiting 6.0.0 when pushing the new tag

* add change log entry for version 6.0.1
  • Loading branch information
nic-lan authored Mar 30, 2021
1 parent a60a141 commit 7325cee
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/gem-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Gem deploy

on:
push:
branches:
- master

jobs:
release:
name: Tag & Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag
id: tag
uses: forward3d/gh-gem-tag-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: v
- name: Read latest Changelog entry
id: changelog
run: |
echo "::set-output name=changelog::`./bin/prepare_changelog.sh`"
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: Release ${{ steps.tag.outputs.tag }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
publish:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build and publish gem
uses: jstastny/publish-gem-to-github@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: forward3d
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* 6.0.1
Add GH action to automate gem deploy to gh packages

* 6.0.0
Remove curb in favor of httparty
BREAKING CHANGE: Remove InsightService
Expand Down
5 changes: 5 additions & 0 deletions bin/prepare_changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog=$(sed -E -n '2,/^\* [0-9]+\.[0-9]+\.[0-9]+/ p' CHANGELOG.txt | sed '$d')
changelog="${changelog//'::'/'@'}"
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
echo "${changelog//$'\r'/'%0D'}"
2 changes: 1 addition & 1 deletion lib/bing-ads-reporting/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BingAdsReporting
VERSION = '6.0.0'.freeze
VERSION = '6.0.1'.freeze
end

0 comments on commit 7325cee

Please sign in to comment.