-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from karelnagel/dev
Dev
- Loading branch information
Showing
589 changed files
with
16,912 additions
and
30,606 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
name: "publish" | ||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- app/package.json | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- app/package.json | ||
|
||
jobs: | ||
create-release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
release_id: ${{ steps.create-release.outputs.result }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: get version | ||
run: echo "PACKAGE_VERSION=$(node -p "require('./app/package.json').version")" >> $GITHUB_ENV | ||
- name: create release | ||
id: create-release | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { data } = await github.rest.repos.createRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag_name: `app-v${process.env.PACKAGE_VERSION}`, | ||
name: `Motionly v${process.env.PACKAGE_VERSION}`, | ||
body: 'Take a look at the assets to download and install this app.', | ||
draft: true, | ||
prerelease: false | ||
}) | ||
return data.id | ||
build-tauri: | ||
needs: create-release | ||
permissions: | ||
contents: write | ||
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: 16 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 6.0.2 | ||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: add mac targets | ||
if: matrix.platform == 'macos-latest' | ||
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin | ||
- 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 frontend dependencies | ||
run: pnpm install # change this to npm or pnpm depending on which one you use | ||
- uses: tauri-apps/tauri-action@dev | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
CI: true | ||
with: | ||
args: ${{ matrix.platform == 'macos-latest' && '--target universal-apple-darwin' || '' }} | ||
releaseId: ${{ needs.create-release.outputs.release_id }} | ||
- uses: actions/upload-artifact@v2 | ||
if: matrix.platform == 'ubuntu-latest' | ||
with: | ||
name: linux-updater-artifacts | ||
path: ./target/release/bundle/appimage/* | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: matrix.platform == 'windows-latest' | ||
with: | ||
name: windows-updater-artifacts | ||
path: ./target/release/bundle/msi/* | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: matrix.platform == 'macos-latest' | ||
with: | ||
name: macos-updater-artifacts | ||
path: ./target/release/bundle/macos/* | ||
|
||
publish-release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
needs: [create-release, build-tauri] | ||
|
||
steps: | ||
- name: publish release | ||
id: publish-release | ||
uses: actions/github-script@v6 | ||
env: | ||
release_id: ${{ needs.create-release.outputs.release_id }} | ||
with: | ||
script: | | ||
github.rest.repos.updateRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: process.env.release_id, | ||
draft: false, | ||
prerelease: false | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ dist/ | |
.turbo/ | ||
.vscode/ | ||
.turbo | ||
target/ |
Oops, something went wrong.