n-link/.github/workflows/publish.yml

70 lines
2.2 KiB
YAML
Raw Normal View History

2020-09-27 18:45:54 +00:00
name: "publish"
on:
2020-09-27 19:02:07 +00:00
push:
branches:
- release
2020-09-27 18:45:54 +00:00
jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
2020-09-27 19:02:07 +00:00
platform: [macos-latest, ubuntu-16.04, windows-latest]
2020-09-27 18:45:54 +00:00
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
src-tauri/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 12
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install tauri bundler
if: runner.os != 'Windows'
run: cargo install tauri-bundler || [ $? -eq 101 ]
- name: install tauri bundler
if: runner.os == 'Windows'
run: cargo install tauri-bundler; exit ($LASTEXITCODE -ne 101 -and $LASTEXITCODE -ne 0)
shell: powershell -command "& '{0}'"
- name: install webkit2gtk (ubuntu only)
2020-09-27 19:02:07 +00:00
if: matrix.platform == 'ubuntu-16.04'
2020-09-27 18:45:54 +00:00
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 squashfs-tools
- name: install app dependencies
run: yarn
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
npmScript: "tauri:build"
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: "N-Link v__VERSION__"
body: "See the assets to download this version and install."
draft: true
prerelease: false