Skip to content

Commit

Permalink
refactor: rewrite as yarn workspace, add cli as test tool (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Apr 26, 2021
1 parent 57b18c4 commit b874256
Show file tree
Hide file tree
Showing 42 changed files with 3,399 additions and 17,954 deletions.
20 changes: 12 additions & 8 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
"pkgManagers": {
"javascript": {
"version": true,
"publish": true
"build": false,
"preversion": "yarn pkg",
"publish": false,
"getPublishedVersion": false,
"assets": false
}
},
"packages": {
"core": {
"path": "./packages/core",
"manager": "javascript"
},
"action": {
"path": "./",
"path": "./packages/action",
"manager": "javascript",
"preversion": ["yarn", "yarn build"],
"getPublishedVersion": "git tag v${ pkgFile.version } 2> OUT= || echo ${ pkgFile.version }",
"publish": [
"git tag v${ pkgFile.versionMajor } -f",
"git tag v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
"git push --tags -f"
"dependencies": [
"core"
]
}
}
Expand Down
5 changes: 5 additions & 0 deletions .changes/tauri-beta-rc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"action": minor
---

Update to Tauri beta release candidate.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

58 changes: 0 additions & 58 deletions .eslintrc.json

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: "test-action"
on:
push:
branches: [dev]
workflow_dispatch:

jobs:
build:
Expand All @@ -21,8 +20,6 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install tauri bundler
run: cargo install tauri-bundler --force
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
Expand Down
71 changes: 11 additions & 60 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Dependency directory
node_modules

# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
Expand All @@ -13,35 +9,8 @@ lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
Expand All @@ -50,8 +19,10 @@ typings/
# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
# Optional cache directory
.npm
.yarn
target

# Optional eslint cache
.eslintcache
Expand All @@ -69,31 +40,11 @@ typings/
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# OS metadata
.DS_Store
Thumbs.db
# lockfiles, as a lib we don't need to lock
yarn.lock

# Ignore built ts files
__tests__/runner/*
lib/**/*
# rollup output
dist
# but we want the action dist
!packages/action/dist
!packages/action/dist/**
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc.json

This file was deleted.

16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install tauri bundler
run: cargo install tauri-bundler --force
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
Expand Down Expand Up @@ -72,16 +70,12 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install tauri bundler
run: cargo install tauri-bundler --force
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: install app dependencies and build it
# If using the Vue CLI plugin, tauri:build will be run automatically by tauri-action
# and you can remove `&& yarn build` from this command
run: yarn && yarn build
- uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -96,6 +90,8 @@ jobs:

## Uploading the artifacts to a release

Note that `actions/create-release` isn't maintained so you should find an alternative or let the Tauri Action handle the release.

```yml
name: "test-on-pr"
on: [pull_request]
Expand All @@ -113,7 +109,7 @@ jobs:
with:
node-version: 12
- name: get version
run: echo ::set-env name=PACKAGE_VERSION::$(node -p "require('./package.json').version")
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: create release
id: create_release
uses: actions/create-release@v1.1.0
Expand Down Expand Up @@ -143,16 +139,12 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install tauri bundler
run: cargo install tauri-bundler --force
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: install app dependencies and build it
# If using the Vue CLI plugin, tauri:build will be run automatically by tauri-action
# and you can remove `&& yarn build` from this command
run: yarn && yarn build
- uses: tauri-apps/tauri-action@v0
env:
Expand Down Expand Up @@ -192,5 +184,5 @@ jobs:
- You can use this Action on a repo that doesn't have Tauri configured. We automatically initialize Tauri before building, and configure it to use your Web artifacts.
- You can configure Tauri with the `configPath`, `distPath` and `iconPath` options.
- You can run custom NPM scripts with the `npmScript` option. So instead of running `yarn tauri build` or `npx tauri build`, we'll execute `yarn ${npmScript}`.
- Useful when you need custom build functionality when creating Tauri apps e.g. a `desktop:build` script.
- Useful when you need custom build functionality when creating Tauri apps e.g. a `desktop:build` script.
- When your app isn't on the root of the repo, use the `projectPath` input.
Loading

0 comments on commit b874256

Please sign in to comment.