Skip to content

Bump trayicon from 0.3.0 to 0.4.0 #130

Bump trayicon from 0.3.0 to 0.4.0

Bump trayicon from 0.3.0 to 0.4.0 #130

Workflow file for this run

name: Rust Build and Test
on:
push:
branches:
- master
pull_request_target:
workflow_dispatch:
release:
types: [created, edited]
permissions:
pull-requests: write
jobs:
#run build first to populate caches
build-windows:
name: Build Windows binary
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features --release
- name: Check for release
id: is-release
shell: bash
run: |
unset IS_RELEASE
if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true'; fi
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
- name: Artifact upload (Windows)
uses: actions/upload-artifact@master
with:
name: rust_cat.exe
path: target/release/rust_cat.exe
- name: Publish archives and packages (Windows)
uses: softprops/action-gh-release@v1
if: steps.is-release.outputs.IS_RELEASE
with:
files: |
target/release/rust_cat.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create universal macOS app bundle
build-macos:
name: Create universal macOS app bundle
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run macOS build script
run: ./build_macos.sh
- name: Check for release
id: is-release
shell: bash
run: |
unset IS_RELEASE
if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true'; fi
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
- name: Upload universal app bundle
uses: actions/upload-artifact@v4
with:
name: RustCat-universal.app.zip
path: RustCat-universal.app.zip
- name: Upload universal DMG
uses: actions/upload-artifact@v4
with:
name: RustCat-universal.dmg
path: RustCat-universal.dmg
- name: Publish universal macOS release
uses: softprops/action-gh-release@v1
if: steps.is-release.outputs.IS_RELEASE
with:
files: |
RustCat-universal.app.zip
RustCat-universal.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Auto-approve Dependabot PRs if build succeeds
dependabot-auto-approve:
runs-on: ubuntu-latest
needs: [build-windows, build-macos]
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target'
steps:
- name: Auto-approve PR
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}