Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Aug 5, 2024
1 parent 16c42e4 commit 43ffc17
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 71 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ jobs:
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
# TODO: figure out Dioxus bundle format for Windows
# - target: x86_64-pc-windows-msvc
# os: windows-latest
# - target: aarch64-pc-windows-msvc
# os: windows-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -47,7 +46,7 @@ jobs:
uses: baptiste0928/cargo-install@v3
with:
crate: dioxus-cli
version: ^0.5.6
version: =0.5.2

- name: Build bundle
run: dx bundle --target ${{ matrix.target }}
53 changes: 38 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,31 @@ jobs:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
output: repoquest.deb
os: ubuntu-latest
ext: deb
- target: x86_64-apple-darwin
os: macos-latest
output: RepoQuest.app.tar.gz
ext: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
output: RepoQuest.app.tar.gz

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:
Expand All @@ -40,36 +47,52 @@ jobs:
uses: baptiste0928/cargo-install@v3
with:
crate: dioxus-cli
version: ^0.5.6
version: =0.5.2

- name: Build bundle
run: dx bundle --release --target ${{ matrix.target }}

- name: Prepare artifacts (MacOS)
if: matrix.os == 'macos-latest'
run: tar -czf RepoQuest.app.tar.gz dist/bundle/macos/RepoQuest.app
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/RepoQuest_*.deb RepoQuest.deb
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: ${{ matrix.output }}
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/RepoQuest.deb
x86_64-apple-darwin/RepoQuest.app.tar.gz
aarch64-apple-darwin/RepoQuest.app.tar.gz
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
Loading

0 comments on commit 43ffc17

Please sign in to comment.