-
Notifications
You must be signed in to change notification settings - Fork 0
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 #56 from epimorphics/feature/github-action
Added Github Action to release & Publish gem
- Loading branch information
Showing
2 changed files
with
43 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release and Publish Gem | ||
on: | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
name: "Build gem package" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Git Information" | ||
id: gitinfo | ||
run: | | ||
echo name=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT | ||
echo branch=${GITHUB_REF#refs/heads/} >> $GITHUB_OUTPUT | ||
make tags >> $GITHUB_OUTPUT | ||
- name: "Publish gem" | ||
env: | ||
VERSION: ${{ steps.gitinfo.outputs.tag }} | ||
shell: "bash" | ||
run: "make publish" | ||
|
||
- name: "Create Release" | ||
id: release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
name: Release ${{ steps.gitinfo.outputs.tag }} | ||
body: ${{steps.github_release.outputs.changelog}} | ||
draft: false | ||
prerelease: false | ||
files: | | ||
lr_common_styles-${{ steps.gitinfo.outputs.version }}.gem |
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