Skip to content

Commit

Permalink
Merge pull request #73 from bonnie57/main
Browse files Browse the repository at this point in the history
Update create release workflow
  • Loading branch information
AndyBoWu authored Jul 9, 2024
2 parents a3f9051 + 0cb3ad6 commit 2445ae9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/reusable-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Reusable workflow to create release in GitHub
on:
workflow_call:
inputs:
version_to_publish:
tag_name:
type: string
required: true
description: 'Version to be published'
description: "Tag name to be published"

permissions:
contents: write
Expand All @@ -32,23 +32,23 @@ jobs:
- name: Tag and Push
id: tag_and_push
run: |
VERSION=${{ inputs.version_to_publish }}
TAG_NAME=${{ inputs.tag_name}}
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git tag -a v$VERSION -m "Release v$VERSION"
git push origin v$VERSION
echo "toTag=v$VERSION" >> $GITHUB_ENV
git tag -a $TAG_NAME -m "Release $TAG_NAME"
git push origin $TAG_NAME
echo "toTag=$TAG_NAME" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
uses: mikepenz/release-changelog-builder-action@1eff87d3e9087a5d44e572b4c431e500dd2124f8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: mikepenz/action-gh-release@v0.2.0-a03 #softprops/action-gh-release
uses: mikepenz/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 #softprops/action-gh-release
with:
tag_name: v${{ inputs.version_to_publish }}
tag_name: ${{ inputs.tag_name }}
body: ${{ steps.build_changelog.outputs.changelog }}

0 comments on commit 2445ae9

Please sign in to comment.