Skip to content

Bump version to 2.0.2-beta.3 #14

Bump version to 2.0.2-beta.3

Bump version to 2.0.2-beta.3 #14

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
- name: Read version
id: version
shell: pwsh
run: |
$v = (Select-String -Path "matchy/Cargo.toml" -Pattern '^version\s*=\s*"([^"]+)"' | Select-Object -First 1).Matches.Groups[1].Value
echo "VERSION=$v" >> $env:GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Remove local-only cargo config
shell: pwsh
run: Remove-Item -Path matchy/.cargo/config.toml -Force -ErrorAction SilentlyContinue
- name: Install frontend dependencies
working-directory: matchy/crates/matchy-app/frontend
run: npm ci
- name: Build Tauri app
shell: pwsh
working-directory: matchy/crates/matchy-app
run: |
if ("${{ github.ref_name }}" -match "-beta|-rc|-alpha") {
.\frontend\node_modules\.bin\tauri.cmd build --bundles nsis
} else {
.\frontend\node_modules\.bin\tauri.cmd build
}
- name: Build CLI
working-directory: matchy
run: cargo build --release -p matchy-cli
- name: Create portable zip
shell: pwsh
run: |
$Version = "${{ steps.version.outputs.VERSION }}"
New-Item -ItemType Directory -Force -Path dist | Out-Null
Compress-Archive -Path "matchy/target/release/matchy-app.exe" `
-DestinationPath "dist/MatchY-${Version}-x64-windows-portable.zip" -Force
- name: Upload NSIS installer
uses: actions/upload-artifact@v4
with:
name: windows-nsis
path: matchy/target/release/bundle/nsis/*.exe
- name: Upload MSI
if: ${{ !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-rc') && !contains(github.ref_name, '-alpha') }}
uses: actions/upload-artifact@v4
with:
name: windows-msi
path: matchy/target/release/bundle/msi/*.msi
- name: Upload portable zip
uses: actions/upload-artifact@v4
with:
name: windows-portable
path: dist/*.zip
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: windows-cli
path: matchy/target/release/matchy.exe
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
musl-tools
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Install frontend dependencies
working-directory: matchy/crates/matchy-app/frontend
run: npm ci
- name: Build Tauri app (AppImage)
working-directory: matchy/crates/matchy-app
run: ./frontend/node_modules/.bin/tauri build --bundles appimage
- name: Build CLI (static musl)
working-directory: matchy
run: cargo build --release -p matchy-cli --target x86_64-unknown-linux-musl
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: linux-appimage
path: matchy/target/release/bundle/appimage/*.AppImage
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: linux-cli
path: matchy/target/x86_64-unknown-linux-musl/release/matchy
build-macos-arm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install frontend dependencies
working-directory: matchy/crates/matchy-app/frontend
run: npm ci
- name: Build Tauri app (DMG, unsigned)
working-directory: matchy/crates/matchy-app
run: ./frontend/node_modules/.bin/tauri build --bundles dmg
env:
APPLE_SIGNING_IDENTITY: '-'
- name: Build CLI
working-directory: matchy
run: cargo build --release -p matchy-cli
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: macos-arm-dmg
path: matchy/target/release/bundle/dmg/*.dmg
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: macos-arm-cli
path: matchy/target/release/matchy
release:
needs: [build-windows, build-linux, build-macos-arm]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Read version
id: version
run: |
VERSION=$(grep '^version\s*=' matchy/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: '*'
merge-multiple: false
- name: Rename and stage release assets
run: |
VERSION="${{ steps.version.outputs.VERSION }}"
mkdir -p release-assets
find artifacts/windows-nsis -name "*.exe" -exec cp {} "release-assets/MatchY-windows-setup.exe" \;
find artifacts/windows-msi -name "*.msi" -exec cp {} "release-assets/MatchY-windows.msi" \; 2>/dev/null || true
find artifacts/windows-portable -name "*.zip" -exec cp {} "release-assets/MatchY-windows-portable.zip" \;
find artifacts/windows-cli -name "matchy.exe" -exec cp {} "release-assets/matchy-cli-windows.exe" \;
find artifacts/linux-appimage -name "*.AppImage" -exec cp {} "release-assets/MatchY-linux.AppImage" \;
find artifacts/linux-cli -name "matchy" -exec cp {} "release-assets/matchy-cli-linux" \;
find artifacts/macos-arm-dmg -name "*.dmg" -exec cp {} "release-assets/MatchY-macos.dmg" \;
find artifacts/macos-arm-cli -name "matchy" -exec cp {} "release-assets/matchy-cli-macos" \;
chmod +x release-assets/matchy-cli-linux \
release-assets/matchy-cli-macos
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') || contains(github.ref_name, '-alpha') }}
files: release-assets/*