Add missing dependencies #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
ext: "" | |
target: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
ext: ".exe" | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
if: matrix.os == "ubuntu-latest" | |
cmd: sudo apt update && sudo apt install libwayland-dev | |
- name: Build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Rename executable | |
run: | | |
mkdir -p bin | |
mv target/release/customizer${{ matrix.ext }} bin/concavum-customizer-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.ext }} | |
- name: Upload executable as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executables | |
path: bin/ | |
release: | |
name: Release | |
env: | |
version: ${{ github.ref_name }} | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: executables | |
- name: Release executables | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Concavum customizer ${{ github.ref_name }} | |
body: The executables for the concavum customizer ${{ github.ref_name }}. | |
files: "*" | |
fail_on_unmatched_files: true | |
deploy-to-pages: | |
name: Deploy to GitHub pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Install wasm-pack | |
uses: jetli/[email protected] | |
- name: Build using wasm-pack | |
run: wasm-pack build customizer --target no-modules --out-dir ../web/pkg --no-typescript --no-pack | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "web" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |