Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+*']
jobs:
linux:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install dependencies on Ubuntu
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- name: Build
run: GIT_COMMIT_HASH=$(git rev-parse --short HEAD) cargo build --release
- name: Gzip
run: |
mkdir ppd-editor
mv ./target/release/ppd-editor ppd-editor/
tar -zcvf ./ppd-editor-linux-${{ github.ref_name }}.tar.gz ppd-editor
mkdir ppd-viewer
mv ./target/release/ppd-viewer ppd-viewer/
tar -zcvf ./ppd-viewer-linux-${{ github.ref_name }}.tar.gz ppd-viewer
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./ppd-editor-linux-${{ github.ref_name }}.tar.gz
./ppd-viewer-linux-${{ github.ref_name }}.tar.gz
macos:
runs-on: macos-11
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install ARM target
run: rustup update && rustup target add aarch64-apple-darwin
- name: Build ARM
run: GIT_COMMIT_HASH=$(git rev-parse --short HEAD) cargo build --release --target=aarch64-apple-darwin
- name: Copy
run: cp ./target/release/osx/ppd-editor ./ppd-editor-macos-${{ github.ref_name }}
- name: Make DMG
run: |
make dmg-universal
mv ./target/release/osx/ppd-editor.dmg ./ppd-editor-macos-${{ github.ref_name }}.dmg
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./ppd-editor-macos-${{ github.ref_name }}.dmg
./ppd-editor-macos-${{ github.ref_name }}
windows:
runs-on: windows-latest
defaults:
run:
shell: bash
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Build
run: GIT_COMMIT_HASH=$(git rev-parse --short HEAD) cargo build --release
- name: Install WiX
run: nuget install WiX -Version 3.11.2
- name: Create msi installer
run: |
./WiX.*/tools/candle.exe -arch "x64" -ext WixUIExtension -ext WixUtilExtension \
-out "./ppd-editor.wixobj" "build/windows/wix/ppd-editor.wxs"
./WiX.*/tools/light.exe -ext WixUIExtension -ext WixUtilExtension \
-out "./ppd-editor-windows-${{ github.ref_name }}.msi" -sice:ICE61 -sice:ICE91 \
"./ppd-editor.wixobj"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./ppd-editor-windows-${{ github.ref_name }}.msi