-
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.
- Loading branch information
1 parent
bcdc952
commit c3dcbb0
Showing
2 changed files
with
28 additions
and
4 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Version, Build, and Publish | ||
name: Version, Build, Publish, Tag, and Release | ||
|
||
on: | ||
push: | ||
|
@@ -28,7 +28,7 @@ jobs: | |
|
||
- name: Install Dependencies | ||
run: | | ||
npm install -g semantic-release @semantic-release/changelog @semantic-release/git | ||
npm install -g semantic-release | ||
npm list -g semantic-release | ||
- name: Verify Installation | ||
|
@@ -48,6 +48,12 @@ jobs: | |
if [ -n "$VERSION" ]; then | ||
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "New version: $VERSION" | ||
# Create and push tag | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git tag -a v$VERSION -m "Release $VERSION" | ||
git push origin v$VERSION | ||
else | ||
echo "No new version to release" | ||
echo "RELEASE_VERSION=latest" >> $GITHUB_ENV | ||
|
@@ -77,3 +83,22 @@ jobs: | |
ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | ||
ghcr.io/${{ github.repository }}:latest | ||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Tconfigd - Central daemon for distributing and managing Tratteria configurations | ||
|
||
- name: Create GitHub Release | ||
if: env.RELEASE_VERSION != 'latest' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: v${{ env.RELEASE_VERSION }} | ||
name: Release ${{ env.RELEASE_VERSION }} | ||
body: | | ||
Release ${{ env.RELEASE_VERSION }} | ||
Docker images for this release: | ||
- `ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }}` | ||
For a detailed list of all changes, please refer to the automatically generated release notes below. | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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