Skip to content

Commit

Permalink
ci: cleanup and release workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Feb 1, 2024
1 parent 4a5abfa commit ce8b9da
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
include:
# MacOS (Intel & Apple Silicon)
- platform: macos-latest
rust_targets: x86_64-apple-darwin,aarch64-apple-darwin
tauri_target: universal-apple-darwin
rust-targets: x86_64-apple-darwin,aarch64-apple-darwin
tauri-target: universal-apple-darwin
# 64-bit Linux
- platform: ubuntu-22.04
rust_targets: x86_64-unknown-linux-gnu
tauri_target: x86_64-unknown-linux-gnu
rust-targets: x86_64-unknown-linux-gnu
tauri-target: x86_64-unknown-linux-gnu
# 64-bit Windows
- platform: windows-latest
rust_targets: x86_64-pc-windows-msvc
tauri_target: x86_64-pc-windows-msvc
rust-targets: x86_64-pc-windows-msvc
tauri-target: x86_64-pc-windows-msvc
# 32-bit Windows
- platform: windows-latest
rust_targets: i686-pc-windows-msvc
tauri_target: i686-pc-windows-msvc
rust-targets: i686-pc-windows-msvc
tauri-target: i686-pc-windows-msvc

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -45,13 +45,12 @@ jobs:
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
with:
toolchain: nightly
targets: ${{ matrix.rust_targets }}
targets: ${{ matrix.rust-targets }}

- run: echo ${{ matrix.tauri_target }}-${{ hashFiles('packages/desktop/Cargo.lock') }}
- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
with:
workspaces: packages/desktop
shared-key: ${{ matrix.tauri_target }}-${{ hashFiles('packages/desktop/Cargo.lock') }}
shared-key: ${{ matrix.tauri-target }}-${{ hashFiles('packages/desktop/Cargo.lock') }}

- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
Expand All @@ -66,9 +65,9 @@ jobs:
id: tauri
with:
projectPath: packages/desktop
args: --target ${{ matrix.tauri_target }}
args: --target ${{ matrix.tauri-target }}

- name: Clean up file names
- name: Move & rename artifacts
run: |
mkdir tmp
ARTIFACTS='${{ steps.tauri.outputs.artifactPaths }}'
Expand All @@ -79,6 +78,6 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: bundle-${{ matrix.tauri_target }}
name: bundle-${{ matrix.tauri-target }}
if-no-files-found: error
path: tmp
2 changes: 1 addition & 1 deletion .github/workflows/lint-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint check
on: push

jobs:
ci:
lint-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ permissions:
pull-requests: write
id-token: write

concurrency:
group: release

jobs:
build:
uses: ./.github/workflows/build.yaml

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -34,23 +38,23 @@ jobs:
gh-assets: |
[
{
"path": "tmp/x86_64-pc-windows-msvc/tauri.msi",
"path": "tmp/bundle-x86_64-pc-windows-msvc/tauri.msi",
"name": "Zebar_x64_${nextRelease.gitTag}.msi"
},
{
"path": "tmp/i686-pc-windows-msvc/tauri.msi",
"path": "tmp/bundle-i686-pc-windows-msvc/tauri.msi",
"name": "Zebar_x86_${nextRelease.gitTag}.msi"
},
{
"path": "tmp/universal-apple-darwin/tauri.dmg",
"path": "tmp/bundle-universal-apple-darwin/tauri.dmg",
"name": "Zebar_${nextRelease.gitTag}.dmg"
},
{
"path": "tmp/x86_64-unknown-linux-gnu/tauri.deb",
"path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.deb",
"name": "Zebar_x64_${nextRelease.gitTag}.deb"
},
{
"path": "tmp/x86_64-unknown-linux-gnu/tauri.AppImage",
"path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.AppImage",
"name": "Zebar_x64_${nextRelease.gitTag}.AppImage"
}
]
Expand Down

0 comments on commit ce8b9da

Please sign in to comment.