Skip to content

v0.0.2

v0.0.2 #16

Workflow file for this run

name: Release
on:
pull_request:
branches: [main]
types: [labeled,closed]
jobs:
build-artifacts:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
ext: deb
- target: x86_64-apple-darwin
os: macos-latest
ext: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
ext: tar.gz
# - target: x86_64-pc-windows-msvc
# os: windows-latest
# ext: exe
# - target: aarch64-pc-windows-msvc
# os: windows-latest
# ext: exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt update -y && sudo apt install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev libxdo-dev
- name: Install Rust toolchain for target
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Install dioxus-cli
uses: baptiste0928/cargo-install@v3
with:
crate: dioxus-cli
version: 0.5.6
- name: Build bundle
run: dx bundle --release --target ${{ matrix.target }}
- name: Prepare artifacts (MacOS)
if: matrix.os == 'macos-latest'
run: |
mv dist/bundle/macos/RepoQuest.app .
tar -czf repo-quest_${{ matrix.target }}.tar.gz RepoQuest.app
- name: Prepare artifacts (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: mv dist/bundle/deb/repo-quest_*.deb repo-quest_${{ matrix.target }}.deb
- name: Prepare artifacts (Windows)
if: matrix.os == 'windows-latest'
run: mv dist/bundle/nsis/repo-quest_*.exe repo-quest_${{ matrix.target }}.exe
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: repo-quest_${{ matrix.target }}.${{ matrix.ext }}
publish-artifacts:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: Add a tag for the merged commit
uses: christophebedard/tag-version-commit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version_regex: 'v([0-9]+\.[0-9]+\.[0-9]+)'
version_tag_prefix: 'v'
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Publish artifacts
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.pull_request.title }}
files: |
x86_64-unknown-linux-gnu/repo-quest_x86_64-unknown-linux-gnu.deb
x86_64-apple-darwin/repo-quest_x86_64-apple-darwin.tar.gz
aarch64-apple-darwin/repo-quest_aarch64-apple-darwin.tar.gz
# x86_64-pc-windows-msvc/repo-quest_x86_64-pc-windows-msvc.exe
# aarch64-pc-windows-msvc/repo-quest_aarch64-pc-windows-msvc.exe