Skip to content

Commit 18a817f

Browse files
committed
Add tag and create a new release on deploy action
--- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/kuboon/restful_error?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent 8f7f93a commit 18a817f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/gem-push.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,23 @@ jobs:
3737
env:
3838
OWNER: ${{ github.repository_owner }}
3939
GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Get Tag Name
42+
run: |
43+
TAG_NAME=$(ruby -e 'require_relative "lib/restful_error/version"; puts "v#{RestfulError::VERSION}"')
44+
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
45+
46+
- name: Create Tag
47+
run: |
48+
git tag $TAG_NAME
49+
git push origin $TAG_NAME
50+
51+
- name: Create Release
52+
uses: actions/create-release@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
tag_name: ${{ env.TAG_NAME }}
57+
release_name: Release ${{ env.TAG_NAME }}
58+
draft: false
59+
prerelease: false

0 commit comments

Comments
 (0)