Skip to content

Commit

Permalink
Switching to old way
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Jan 10, 2023
1 parent 002cec3 commit ca70591
Showing 1 changed file with 36 additions and 78 deletions.
114 changes: 36 additions & 78 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,43 @@
name: 'publish'

name: "publish"
on:
push:
branches:
- main
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write

jobs:
build-binaries:
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-latest
rust_target: x86_64-unknown-linux-gnu
- os: macos-latest
rust_target: x86_64-apple-darwin
- os: macos-latest
rust_target: aarch64-apple-darwin
- os: windows-latest
rust_target: x86_64-pc-windows-msvc

runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: 'Setup Rust'
uses: actions-rs/toolchain@v1
with:
default: true
override: true
profile: minimal
toolchain: stable
target: ${{ matrix.platform.rust_target }}

- uses: Swatinem/rust-cache@v2

- name: install dependencies (ubuntu only)
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- uses: JonasKruckenberg/[email protected]
id: tauri_build
with:
target: ${{ matrix.platform.rust_target }}

# The artifacts output can now be used to upload the artifacts
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}"

publish:
needs: build-binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the previously uploaded artifacts
- uses: actions/download-artifact@v3
id: download
with:
name: artifacts
path: artifacts
# And create a release with the artifacts attached
- name: 'create release'
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
draft: false
files: ./artifacts/**/*
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: yarn && yarn build
- uses: tauri-apps/tauri-action@v0
with:
tagName: app-v__VERSION__
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false

0 comments on commit ca70591

Please sign in to comment.