Skip to content

Commit

Permalink
feat: .gitrelease file for container build
Browse files Browse the repository at this point in the history
Generate a .gitrelease file as the final step of the @semantic-release
action. This way the file will be available in the followup docker
image build step, but not part of the committed changelog.
  • Loading branch information
mhitza committed Sep 17, 2024
1 parent ae0328a commit bd311b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/.github/workflows/30-release-and-build.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
}
]
additional-packages: |
['@semantic-release/changelog', '@semantic-release/git']
['@semantic-release/changelog', '@semantic-release/git', '@semantic-release/exec']
repository-url: 'https://github.com/${{ github.repository_owner }}/${{ env.CI_REPOSITORY_NAME }}.git'
tag-format: 'v${version}'
env:
Expand Down
6 changes: 6 additions & 0 deletions templates/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/exec",
{
"publishCmd": "echo ${nextRelease.version} > .gitrelease"
}
]
]
}

0 comments on commit bd311b4

Please sign in to comment.