Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlo411 committed Jan 21, 2025
2 parents fabe372 + a355a58 commit ff263de
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
26 changes: 21 additions & 5 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 @@ -35,14 +35,30 @@ jobs:
LOWERCASE_REPO_NAME=$(echo "$REPO_NAME" | tr '[:upper:]' '[:lower:]')
docker push ghcr.io/${{ github.actor }}/$LOWERCASE_REPO_NAME:${{ 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
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 }}

- name: Output Release URL
run: echo "Release URL: ${{ steps.release.outputs.html_url }}"
run: |
echo "Release URL: ${{ steps.release.outputs.html_url }}"
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "team-spiral-racing",
"private": true,
"version": "0.0.1",
"version": "v0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
Expand Down

0 comments on commit ff263de

Please sign in to comment.