Your favorite shift management application!
chore: Improves build configuration and release automation (#13)
panteL1268685783c0
diff --git a/.dockerignore b/.dockerignoreindex 73da620..990930b 100644--- a/.dockerignore+++ b/.dockerignore@@ -24,7 +24,7 @@ yarn-debug.log*yarn-error.log*.pnpm-debug.log*-# env files+# env files (excluded for security - use build args or runtime env).env*!.env.example@@ -35,19 +35,27 @@ yarn-error.log**.tsbuildinfonext-env.d.ts-# database+# database (local data should not be in image)sqlite.dbsqlite.db-journal+sqlite.db-shm+sqlite.db-waldata/# git.git.gitignore+.github# IDE.vscode.idea+# docker+docker-compose.override.yml+# miscREADME.md*.md+test-changelog.sh+LICENSE\ No newline at end of filediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex cb8ad21..0b75a5f 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -15,11 +15,77 @@ jobs:steps:- name: Checkout codeuses: actions/checkout@v4+ with:+ fetch-depth: 0- name: Extract version from tagid: versionrun: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT+ - name: Generate changelog+ id: changelog+ run: |+ # Get previous tag+ PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sed -n '2p')++ if [ -z "$PREVIOUS_TAG" ]; then+ echo "No previous tag found, showing all commits"+ PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD)+ fi++ echo "Generating changelog from $PREVIOUS_TAG to $GITHUB_REF_NAME"++ # Get all commits between tags (range already excludes the tag commit)+ ALL_COMMITS=$(git log $PREVIOUS_TAG..$GITHUB_REF_NAME --pretty=format:"%s|%h" --no-merges)++ # Build changelog with grouping+ CHANGELOG=""++ # Features+ FEATURES=$(echo "$ALL_COMMITS" | grep "^feat:" | sed 's/|/ /' | sed 's/^/- /' || true)+ if [ -n "$FEATURES" ]; then+ CHANGELOG+="### β¨ Features"$'\n\n'+ CHANGELOG+="$FEATURES"$'\n\n'+ fi++ # Bug Fixes+ FIXES=$(echo "$ALL_COMMITS" | grep "^fix:" | sed 's/|/ /' | sed 's/^/- /' || true)+ if [ -n "$FIXES" ]; then+ CHANGELOG+="### π Bug Fixes"$'\n\n'+ CHANGELOG+="$FIXES"$'\n\n'+ fi++ # Documentation+ DOCS=$(echo "$ALL_COMMITS" | grep "^docs:" | sed 's/|/ /' | sed 's/^/- /' || true)+ if [ -n "$DOCS" ]; then+ CHANGELOG+="### π Documentation"$'\n\n'+ CHANGELOG+="$DOCS"$'\n\n'+ fi++ # Chores+ CHORES=$(echo "$ALL_COMMITS" | grep "^chore:" | sed 's/|/ /' | sed 's/^/- /' || true)+ if [ -n "$CHORES" ]; then+ CHANGELOG+="### π§ Chores"$'\n\n'+ CHANGELOG+="$CHORES"$'\n\n'+ fi++ # Other changes (not matching conventional commits)+ OTHERS=$(echo "$ALL_COMMITS" | grep -vE "^(feat|fix|docs|chore):" | sed 's/|/ /' | sed 's/^/- /' || true)+ if [ -n "$OTHERS" ]; then+ CHANGELOG+="### π Other Changes"$'\n\n'+ CHANGELOG+="$OTHERS"$'\n\n'+ fi++ # Use heredoc for multiline output+ {+ echo 'changelog<<EOF'+ echo "$CHANGELOG"+ echo EOF+ } >> $GITHUB_OUTPUT++ # Set previous tag+ echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT+- name: Set up Docker Buildxuses: docker/setup-buildx-action@v3@@ -54,22 +120,24 @@ jobs:- name: Create Releaseuses: softprops/action-gh-release@v2with:- name: Release v${{ steps.version.outputs.VERSION }}+ name: v${{ steps.version.outputs.VERSION }}body: |- ## What's Changed+ ## π¦ What's Changed++ ${{ steps.changelog.outputs.changelog }}- See the [commit history](https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.VERSION }}) for details.+ **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.changelog.outputs.previous_tag }}...v${{ steps.version.outputs.VERSION }}- ## Docker Image+ ## π³ Docker Image```bashdocker pull ghcr.io/${{ github.repository }}:v${{ steps.version.outputs.VERSION }}docker pull ghcr.io/${{ github.repository }}:latest```- Available tags:- - `ghcr.io/${{ github.repository }}:v${{ steps.version.outputs.VERSION }}` (specific version)- - `ghcr.io/${{ github.repository }}:latest` (always latest release)+ ### Available tags:+ - `v${{ steps.version.outputs.VERSION }}` - Specific version+ - `latest` - Latest stable releasedraft: falseprerelease: falseenv:diff --git a/.gitignore b/.gitignoreindex d8cde63..328b211 100644--- a/.gitignore+++ b/.gitignore@@ -29,6 +29,7 @@ npm-debug.log*yarn-debug.log*yarn-error.log*.pnpm-debug.log*+lerna-debug.log*# env files (can opt-in for committing if needed).env*@@ -41,13 +42,29 @@ yarn-error.log**.tsbuildinfonext-env.d.ts-# database+# database (local SQLite database and data directory)sqlite.dbsqlite.db-journal+sqlite.db-shm+sqlite.db-waldata/-# docker+# docker (local override configuration)docker-compose.override.yml+# IDE (editor configurations)+.vscode/+.idea/+*.swp+*.swo+*~++# OS+.DS_Store+Thumbs.db+# version info (generated at build time)-public/version.json\ No newline at end of file+public/version.json++# scripts (local testing scripts)+test-changelog.sh\ No newline at end of file