aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/push-test.yml48
-rw-r--r--.github/workflows/release.yml18
2 files changed, 58 insertions, 8 deletions
diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml
index cb7491e9..4cac9da3 100644
--- a/.github/workflows/push-test.yml
+++ b/.github/workflows/push-test.yml
@@ -27,6 +27,34 @@ jobs:
- name: Format check
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
+ clippy:
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [ubuntu-22.04, windows-latest]
+
+ name: clippy-check
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+ components: clippy
+ - name: install dependencies (ubuntu only)
+ if: matrix.platform == 'ubuntu-22.04'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
+ - name: Create dist folder (Ubuntu only)
+ if: matrix.platform == 'ubuntu-22.04'
+ run: mkdir --parent src-vue/dist
+ - name: Create dist folder (Windows only)
+ if: matrix.platform == 'windows-latest'
+ run: New-Item -ItemType Directory -Force -Path "src-vue\dist"
+ - name: Run clippy
+ run: cargo clippy --manifest-path src-tauri/Cargo.toml -- --no-deps --deny warnings
+
# Ensure committed bindings correct
autogen-ts-bindings-check:
runs-on: ubuntu-latest
@@ -95,23 +123,39 @@ jobs:
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
run: |
- npm install
- cd src-vue && npm install && cd ..
+ npm clean-install
+ cd src-vue && npm clean-install && cd ..
npm run tauri build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
- name: Upload Linux artifact
+ if: matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v3
with:
name: linux-artifacts
path: |
src-tauri/target/release/bundle/appimage/*
+ - name: Upload Linux AppImage
+ if: matrix.platform == 'ubuntu-22.04'
+ uses: actions/upload-artifact@v3
+ with:
+ name: linux-appimage
+ path: |
+ src-tauri/target/release/bundle/appimage/*.AppImage
- name: Upload Windows artifact
+ if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: windows-artifacts
path: |
src-tauri/target/release/bundle/msi/*
src-tauri/target/release/app.pdb
+ - name: Additionally upload Windows installer separately
+ if: matrix.platform == 'windows-latest'
+ uses: actions/upload-artifact@v3
+ with:
+ name: windows-msi
+ path: |
+ src-tauri/target/release/bundle/msi/*.msi
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 23c504aa..8b2235e5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,7 +1,11 @@
name: "release"
on:
- release:
- types: [ created ]
+ push:
+ tags:
+ - 'v*'
+
+permissions:
+ contents: write # Needed to write to GitHub draft release
jobs:
# Ensure version numbers in various places match up
@@ -14,7 +18,7 @@ jobs:
pip install toml
- name: Run check
run: |
- python3 scripts/check_version_numbers.py --release ${{github.event.release.tag_name}}
+ python3 scripts/check_version_numbers.py --release ${{github.ref_name}}
build:
needs: ensure-same-version
@@ -47,8 +51,8 @@ jobs:
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
run: |
- npm install
- cd src-vue && npm install && cd ..
+ npm clean-install
+ cd src-vue && npm clean-install && cd ..
npm run tauri build
- uses: tauri-apps/tauri-action@v0
env:
@@ -76,6 +80,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
+ draft: true
files: |
src-tauri/target/release/bundle/appimage/*AppImage*
src-tauri/target/release/bundle/msi/*msi*
@@ -88,10 +93,11 @@ jobs:
- uses: actions/download-artifact@v3
- name: Create release file
run: |
- python3 scripts/create-release-file.py --version ${{github.event.release.tag_name}}
+ python3 scripts/create-release-file.py --version ${{github.ref_name}}
- name: upload release file
uses: softprops/action-gh-release@v1
with:
+ draft: true
files: |
latest-release.json