Release v0.6.13 #14
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags (v0.6.4, v1.0.0, etc.) | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history needed for changelog | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get version from tag | |
| id: version | |
| run: | | |
| # Extract version from tag (v0.6.4 -> 0.6.4) | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Release version: $VERSION" | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Install zip utility | |
| run: sudo apt-get update && sudo apt-get install -y zip | |
| - name: Generate changelog from commits | |
| id: changelog | |
| run: | | |
| # Find previous version tag (not release trigger tags) | |
| PREV_TAG=$(git describe --tags --abbrev=0 --match "v[0-9]*" HEAD^ 2>/dev/null || echo "") | |
| echo "Previous tag: ${PREV_TAG:-none (first release)}" | |
| if [ -z "$PREV_TAG" ]; then | |
| # First release - get all commits (excluding automated commits) | |
| COMMITS=$(git log --pretty=format:"- %s (%h)" --no-merges | grep -v "\[skip ci\]" | grep -v "Update CHANGELOG" | grep -v "Release v" | head -20) | |
| else | |
| # Get commits since last version tag (excluding automated commits) | |
| COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s (%h)" --no-merges | grep -v "\[skip ci\]" | grep -v "Update CHANGELOG" | grep -v "Release v") | |
| fi | |
| # Build changelog for GitHub release | |
| { | |
| echo "changelog<<EOF" | |
| echo "## What's Changed" | |
| echo "" | |
| echo "$COMMITS" | |
| if [ -n "$PREV_TAG" ]; then | |
| echo "" | |
| echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...v${{ steps.version.outputs.version }}" | |
| fi | |
| echo "EOF" | |
| } >> $GITHUB_OUTPUT | |
| - name: Build all platforms | |
| run: | | |
| ./build.sh | |
| echo "✓ Built all platforms" | |
| - name: Install Debian packaging tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dpkg-dev debhelper devscripts dput-ng | |
| - name: Build Debian packages (amd64) | |
| run: | | |
| ./build-deb.sh amd64 both | |
| echo "✓ Built amd64 .deb packages" | |
| - name: Build Debian packages (arm64) | |
| run: | | |
| ./build-deb.sh arm64 both | |
| echo "✓ Built arm64 .deb packages" | |
| - name: Build source package for PPA | |
| run: | | |
| ./build-source-package.sh | |
| echo "✓ Built source package" | |
| - name: Import GPG key | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | base64 -d | gpg --batch --import | |
| echo "✓ GPG key imported" | |
| - name: Sign source package | |
| env: | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| LAUNCHPAD_EMAIL: ${{ secrets.LAUNCHPAD_EMAIL }} | |
| run: | | |
| cd publish/source | |
| # Configure debsign to use GPG agent with passphrase | |
| echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf | |
| gpg-connect-agent reloadagent /bye | |
| # Sign the changes file | |
| debsign -k "$LAUNCHPAD_EMAIL" --no-re-sign lrm_*_source.changes | |
| echo "✓ Source package signed" | |
| - name: Upload to Launchpad PPA | |
| env: | |
| LAUNCHPAD_EMAIL: ${{ secrets.LAUNCHPAD_EMAIL }} | |
| run: | | |
| cd publish/source | |
| # Configure dput for PPA | |
| cat > ~/.dput.cf << EOF | |
| [lrm-tool-ppa] | |
| fqdn = ppa.launchpad.net | |
| method = ftp | |
| incoming = ~nickprotop/ubuntu/lrm-tool/ | |
| login = anonymous | |
| allow_unsigned_uploads = 0 | |
| EOF | |
| # Upload to PPA | |
| dput lrm-tool-ppa lrm_*_source.changes | |
| echo "✓ Uploaded to PPA: ppa:nickprotop/lrm-tool" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }} | |
| name: "Localization Resource Manager v${{ steps.version.outputs.version }}" | |
| body: | | |
| # LRM v${{ steps.version.outputs.version }} | |
| ${{ steps.changelog.outputs.changelog }} | |
| ## 📦 Downloads | |
| ### APT/PPA Installation (Recommended for Ubuntu/Debian) | |
| ```bash | |
| sudo add-apt-repository ppa:nickprotop/lrm-tool | |
| sudo apt update | |
| sudo apt install lrm # Framework-dependent (~200KB) | |
| # OR | |
| sudo apt install lrm-standalone # Self-contained (~72MB) | |
| ``` | |
| ### Direct Downloads | |
| Choose the appropriate version for your platform: | |
| **Linux (Direct Download):** | |
| - **x64:** `lrm-linux-x64.tar.gz` | |
| - **ARM64:** `lrm-linux-arm64.tar.gz` *(Raspberry Pi, etc.)* | |
| **Linux (.deb packages):** | |
| - **x64 Framework-dependent:** `lrm_${{ steps.version.outputs.version }}-1_amd64.deb` (~200KB, requires dotnet-runtime-9.0) | |
| - **x64 Self-contained:** `lrm-standalone_${{ steps.version.outputs.version }}-1_amd64.deb` (~72MB) | |
| - **ARM64 Framework-dependent:** `lrm_${{ steps.version.outputs.version }}-1_arm64.deb` | |
| - **ARM64 Self-contained:** `lrm-standalone_${{ steps.version.outputs.version }}-1_arm64.deb` | |
| **Windows:** | |
| - **x64:** `lrm-win-x64.zip` | |
| - **ARM64:** `lrm-win-arm64.zip` | |
| ## 📖 Installation | |
| See the [Installation Guide](https://github.com/${{ github.repository }}/blob/main/docs/INSTALLATION.md) for detailed instructions. | |
| ## 🧪 Verified | |
| ✅ All tests passing | |
| files: | | |
| publish/lrm-linux-x64.tar.gz | |
| publish/lrm-linux-arm64.tar.gz | |
| publish/lrm-win-x64.zip | |
| publish/lrm-win-arm64.zip | |
| publish/deb/lrm_${{ steps.version.outputs.version }}-1_amd64.deb | |
| publish/deb/lrm-standalone_${{ steps.version.outputs.version }}-1_amd64.deb | |
| publish/deb/lrm_${{ steps.version.outputs.version }}-1_arm64.deb | |
| publish/deb/lrm-standalone_${{ steps.version.outputs.version }}-1_arm64.deb | |
| draft: false | |
| prerelease: false |