Эх сурвалжийг харах

chore: publish sequence finishing touches (#873)

Jacob Bolda 5 жил өмнө
parent
commit
daa89213de

+ 3 - 5
.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": [

+ 46 - 1
.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

+ 2 - 7
.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/