2021-04-11 01:09:09 +03:00
|
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2020-07-19 23:50:56 +03:00
|
|
|
name: version or publish
|
2020-07-19 23:33:12 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
version-or-publish:
|
|
|
|
runs-on: ubuntu-latest
|
2020-11-10 17:46:23 +03:00
|
|
|
timeout-minutes: 65
|
2020-07-20 08:19:35 +03:00
|
|
|
outputs:
|
|
|
|
change: ${{ steps.covector.outputs.change }}
|
|
|
|
commandRan: ${{ steps.covector.outputs.commandRan }}
|
|
|
|
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
|
2020-07-19 23:33:12 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-10-22 17:33:02 +03:00
|
|
|
- uses: actions/setup-node@v2
|
2020-07-19 23:33:12 +03:00
|
|
|
with:
|
2020-11-10 17:46:23 +03:00
|
|
|
node-version: 14
|
2022-02-09 02:02:51 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-10-22 17:33:02 +03:00
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: tooling/*/yarn.lock
|
2022-02-09 02:02:51 +03:00
|
|
|
|
2020-07-19 23:33:12 +03:00
|
|
|
- name: cargo login
|
|
|
|
run: cargo login ${{ secrets.crate_token }}
|
|
|
|
- name: git config
|
|
|
|
run: |
|
|
|
|
git config --global user.name "${{ github.event.pusher.name }}"
|
|
|
|
git config --global user.email "${{ github.event.pusher.email }}"
|
2020-07-20 08:35:13 +03:00
|
|
|
- name: covector version or publish (publish when no change files present)
|
2022-02-13 06:56:06 +03:00
|
|
|
uses: jbolda/covector/packages/action@covector-v0
|
2020-07-19 23:33:12 +03:00
|
|
|
id: covector
|
2020-07-20 23:21:43 +03:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2020-11-10 16:59:04 +03:00
|
|
|
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
|
2020-07-19 23:33:12 +03:00
|
|
|
with:
|
2020-07-20 23:21:43 +03:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-31 02:55:42 +03:00
|
|
|
command: 'version-or-publish'
|
2020-07-20 07:34:16 +03:00
|
|
|
createRelease: true
|
2020-07-19 23:33:12 +03:00
|
|
|
- name: Create Pull Request With Versions Bumped
|
2020-07-23 05:00:28 +03:00
|
|
|
if: steps.covector.outputs.commandRan == 'version'
|
2020-11-10 09:53:57 +03:00
|
|
|
uses: tauri-apps/create-pull-request@v3.4.1
|
2020-07-19 23:33:12 +03:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: release/version-updates
|
|
|
|
title: Apply Version Updates From Current Changes
|
2022-02-09 02:02:51 +03:00
|
|
|
commit-message: 'apply version updates'
|
|
|
|
labels: 'version updates'
|
2020-07-19 23:33:12 +03:00
|
|
|
body: ${{ steps.covector.outputs.change }}
|
|
|
|
|
2022-02-09 02:02:51 +03:00
|
|
|
- name: Trigger doc update
|
|
|
|
if: steps.covector.outputs.successfulPublish == 'true'
|
|
|
|
uses: peter-evans/repository-dispatch@v1
|
2020-07-21 20:35:43 +03:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.TAURI_BOT_PAT }}
|
2022-02-09 02:02:51 +03:00
|
|
|
repository: tauri-apps/tauri-docs
|
|
|
|
event-type: update-docs
|
2022-02-10 04:11:00 +03:00
|
|
|
|
|
|
|
- name: Trigger cli.js publishing workflow
|
|
|
|
if: |
|
|
|
|
steps.covector.outputs.successfulPublish == 'true' &&
|
2022-02-11 02:08:54 +03:00
|
|
|
contains(steps.covector.outputs.packagesPublished, 'cli.rs')
|
2022-02-10 04:11:00 +03:00
|
|
|
uses: peter-evans/repository-dispatch@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.TAURI_BOT_PAT }}
|
|
|
|
repository: tauri-apps/tauri
|
|
|
|
event-type: publish-clijs
|