From daa89213dea12ffcda87513fbfcc9eb7bae84a4e Mon Sep 17 00:00:00 2001 From: Jacob Bolda Date: Tue, 21 Jul 2020 12:35:43 -0500 Subject: [PATCH] chore: publish sequence finishing touches (#873) --- .changes/config.json | 8 ++-- .../workflows/covector-version-or-publish.yml | 47 ++++++++++++++++++- .github/workflows/update-docs.yml | 9 +--- 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/.changes/config.json b/.changes/config.json index 541b9f092..782be52a4 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -36,8 +36,7 @@ }, { "command": "cargo package --no-verify --allow-dirty", - "dryRunCommand": true, - "pipe": true + "dryRunCommand": true } ], "publish": [ @@ -53,7 +52,7 @@ }, { "command": "cargo publish --no-verify", - "dryRunCommand": "cargo publish --no-verify --dry-run", + "dryRunCommand": "cargo publish --no-verify --dry-run --allow-dirty", "pipe": true }, { @@ -105,8 +104,7 @@ }, { "command": "npm pack", - "dryRunCommand": true, - "pipe": true + "dryRunCommand": true } ], "publish": [ diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index caf6e11b9..91d6f1200 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -37,7 +37,7 @@ jobs: command: 'version-or-publish' createRelease: true - name: Create Pull Request With Versions Bumped - if: ${{ steps.covector.outputs.command }} == 'version' + if: steps.covector.outputs.command == 'version' uses: tauri-apps/create-pull-request@v2.8.0 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +47,51 @@ jobs: labels: "version updates" body: ${{ steps.covector.outputs.change }} + update-docs: + needs: version-or-publish + if: needs.version-or-publish.outputs.successfulPublish == 'true' + runs-on: ubuntu-latest + steps: + - name: checkout tauri + uses: actions/checkout@v2 + with: + path: tauri + - name: checkout tauri-docs + uses: actions/checkout@v2 + with: + repository: tauri-apps/tauri-docs + path: tauri-docs + - name: install webkit2gtk + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 + - name: generate rust docs + working-directory: tauri + run: cargo doc --no-deps + - name: run rustdocusaurus + uses: tauri-apps/rustdocusaurus/github-action@v1 + with: + originPath: ./tauri/target/doc/ + targetPath: ./tauri-docs/docs/api/rust/ + sidebarPath: ./tauri-docs/sidebars.json + linksRoot: /docs/api/rust/ + cratesToProcess: "tauri,tauri_api,tauri_utils" + - name: git config + run: | + git config --global user.name "${{ github.event.pusher.name }}" + git config --global user.email "${{ github.event.pusher.email }}" + - name: create pull request for updated docs + uses: tauri-apps/create-pull-request@v2.8.0 + with: + token: ${{ secrets.TAURI_BOT_PAT }} + commit-message: "chore(docs): Update Rust docs" + branch: docs/release + path: tauri-docs + title: Update Docs + labels: "new release" + body: | + These are the updated docs from the most recent release. + tangle: runs-on: ubuntu-latest needs: version-or-publish diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 9bc2ecb3f..8adcfb303 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -1,12 +1,7 @@ name: update-docs on: - push: - branches: - - latest - paths: - - '**/package.json' - - '.github/workflows/**' + workflow_dispatch: jobs: update-docs: @@ -29,7 +24,7 @@ jobs: working-directory: tauri run: cargo doc --no-deps - name: run rustdocusaurus - uses: tauri-apps/rustdocusaurus/github-action@master + uses: tauri-apps/rustdocusaurus/github-action@v1 with: originPath: ./tauri/target/doc/ targetPath: ./tauri-docs/docs/api/rust/