Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2758 from teamleadercrm/bugfix/workflow
Browse files Browse the repository at this point in the history
Duplicate task
  • Loading branch information
mrtus authored Sep 8, 2023
2 parents 8bf5750 + b114fa0 commit 04d0c1e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/generate-changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"template": "## What's changed\n\n#{{CHANGELOG}}\n\n#{{UNCATEGORIZED}}\n\n**Full Changelog**: #{{RELEASE_DIFF}}",
"categories": [
{
"title": "### Fixes",
"labels": ["bug", "bugfix", "hotfix"]
}
]
}
50 changes: 48 additions & 2 deletions .github/workflows/create-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,53 @@ on:
- next-release
paths:
- "package.json"

jobs:
create-new-tag:
uses: teamleadercrm/teamleader-github-workflows/.github/workflows/create-tag-node.yaml@v1.13.0
secrets: inherit
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v2
with:
application_id: ${{ secrets.GH_APPLICATION_ID }}
application_private_key: ${{ secrets.GH_APPLICATION_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get library Package version
run: echo "COMPONENT_TAG=$(jq -r '.version' ./package.json)" >> $GITHUB_ENV
- name: Check tag does not exists
uses: rickstaa/action-contains-tag@v1
id: contains_tag
with:
reference: master
tag: ${{ env.COMPONENT_TAG }}
frail: false
- name: Release
uses: softprops/action-gh-release@v1
id: release
with:
token: ${{ steps.get_workflow_token.outputs.token }}
tag_name: ${{ env.COMPONENT_TAG }}
if: ${{ steps.contains_tag.outputs.retval != 'true' }}
- name: Generate Changelog
id: generate_changelog
uses: mikepenz/release-changelog-builder-action@v4.0.0
with:
configuration: .github/generate-changelog-configuration.json
token: ${{ steps.get_workflow_token.outputs.token }}
toTag: ${{ env.COMPONENT_TAG }}
if: ${{ steps.contains_tag.outputs.retval != 'true' }}
- name: Update release with Changelog
uses: softprops/action-gh-release@v1
id: release_update
with:
token: ${{ steps.get_workflow_token.outputs.token }}
body: ${{ steps.generate_changelog.outputs.changelog }}
tag_name: ${{ env.COMPONENT_TAG }}
if: ${{ steps.contains_tag.outputs.retval != 'true' }}

0 comments on commit 04d0c1e

Please sign in to comment.