Skip to content

Commit

Permalink
Implement automated release process
Browse files Browse the repository at this point in the history
  • Loading branch information
kchiranjewee63 committed Aug 7, 2024
1 parent 2d16adf commit 74e84b7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/version-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @semantic-release/commit-analyzer
npm list -g semantic-release
- name: Verify Installation
Expand All @@ -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
Expand Down Expand Up @@ -89,3 +95,23 @@ jobs:
ghcr.io/${{ github.repository }}-init:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository }}-init:latest
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Tratteria Agent Init Container - Initialization container for Tratteria Agents

- 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 }}`
- `ghcr.io/${{ github.repository }}-init:${{ 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 }}
6 changes: 3 additions & 3 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator"
]
"@semantic-release/commit-analyzer"
],
"dryRun": true
}

0 comments on commit 74e84b7

Please sign in to comment.