Skip to content

GitHub Actions: Experiment with manual artifact uploading #8

GitHub Actions: Experiment with manual artifact uploading

GitHub Actions: Experiment with manual artifact uploading #8

Workflow file for this run

name: Create release
on:
push:
branches:
- release
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
src: 'target/aarch64-apple-darwin/release/bundle/dmg/reaboot_*_aarch64.dmg'
dest: 'reaboot-arm64.dmg'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
src: 'target/x86_64-apple-darwin/release/bundle/dmg/reaboot_*_x64.dmg'
dest: 'reaboot-x86_64.dmg'
- platform: 'windows-latest'
args: '--bundles none'
src: 'target/release/reaboot.exe'
dest: 'reaboot-x64.exe'
- platform: 'ubuntu-20.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: '--bundles deb'
src: 'target/release/bundle/deb/reaboot_*_amd64.deb'
dest: 'reaboot-x86_64.deb'
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-20.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: gui/package-lock.json
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: install frontend dependencies
working-directory: gui
run: npm install
- name: Build
working-directory: gui
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: npm run tauri build -- ${{ matrix.settings.args }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.dest }}
path: ${{ matrix.src }}
# - uses: tauri-apps/tauri-action@v0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
# with:
# projectPath: gui
# args: ${{ matrix.settings.args }}
# tagName: v__VERSION__
# releaseName: 'v__VERSION__'