fix(publish): login and build (#406) [version updates] (#407)

* yarn before pack

* login to cargo to publish

* skip install on same version

* workflow edits trigger too

* and this one too

Co-authored-by: Jacob Bolda <me@jacobbolda.com>
This commit is contained in:
github-actions[bot]
2020-02-09 16:35:23 -06:00
committed by GitHub
parent fb30b4b5be
commit 6caed9c773
4 changed files with 32 additions and 16 deletions

24
.github/workflows/check-on-push.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: clippy check
on:
push:
branches-ignore:
- master
- dev
jobs:
clippy_check:
runs-on: ubuntu-latest
env:
TAURI_DIST_DIR: tauri/test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
steps:
- uses: actions/checkout@v2
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -6,6 +6,7 @@ on:
- master
paths:
- '**/Cargo.toml'
- '.github/workflows/**'
jobs:
publish:
@@ -57,6 +58,9 @@ jobs:
echo "post package dir:"
cd ${{ matrix.publishPath }}
ls
- name: cargo login
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
run: cargo login {{ secrets.crate_token }}
- name: cargo audit
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
working-directory: ${{ matrix.package.path }}

View File

@@ -6,6 +6,7 @@ on:
- master
paths:
- '**/package.json'
- '.github/workflows/**'
jobs:
publish:
@@ -30,6 +31,9 @@ jobs:
run: echo ::set-env name=PACKAGE_VERSION::$(node -p "require('./package.json').version")
- name: check published version
run: echo ::set-env name=PUBLISHED_VERSION::$(npm view ${{ matrix.package.registryName }} version)
- name: yarn install
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
run: yarn
- name: npm pack
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
working-directory: ${{ matrix.package.path }}

View File

@@ -3,22 +3,6 @@ name: test library
on: pull_request
jobs:
clippy_check:
runs-on: ubuntu-latest
env:
TAURI_DIST_DIR: tauri/test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
steps:
- uses: actions/checkout@v2
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
build-tauri-core:
runs-on: ${{ matrix.platform }}