Skip to content

Commit

Permalink
chore: update ci pipeline to build tar balls for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlo411 committed Jan 21, 2025
1 parent aba5070 commit 2398417
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build Docker Image and Publish Release
on:
push:
tags:
- 'v*.*.*' # Triggers on tag push (e.g., v1.0.0, v1.2.3)
- 'v*.*.*'

jobs:
build_and_release:
Expand Down Expand Up @@ -31,12 +31,27 @@ jobs:
run: |
docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }}
- name: Create a GitHub Release
- name: Generate release notes
id: generate_release_notes
run: |
release_notes=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"* %s (%an)" | sed 's/\\n/\\n\\n/g')
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$release_notes" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create .tar.gz archive of repository files
run: |
# Create a tarball of the repository
tar -czf release-${{ github.ref_name }}.tar.gz --exclude .git --exclude .github .
- name: Upload .tar.gz archive as a GitHub Release asset
id: release
uses: softprops/action-gh-release@v1
with:
files: |
./path/to/your/output/files/*.tar.gz # You can include any other artifacts you want to attach to the release
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: ${{ env.RELEASE_NOTES }}
files: release-${{ github.ref_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 2398417

Please sign in to comment.