mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(cli): add prepublish scripts to the plugin templates
This commit is contained in:
6
.changes/cli-plugin-template-covector.md
Normal file
6
.changes/cli-plugin-template-covector.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Fixes the covector configuration on the plugin templates.
|
||||
@@ -4,6 +4,36 @@
|
||||
"rust": {
|
||||
"version": true,
|
||||
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
||||
"prepublish": [
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0",
|
||||
"cargo install cargo-audit",
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Cargo Audit\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "cargo audit ${ process.env.CARGO_AUDIT_OPTIONS || '' }",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"command": "cargo package --allow-dirty",
|
||||
|
||||
@@ -17,10 +17,15 @@ jobs:
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- 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 }}"
|
||||
|
||||
- name: covector version-or-publish
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
id: covector
|
||||
@@ -28,6 +33,7 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
command: 'version-or-publish'
|
||||
createRelease: true
|
||||
|
||||
- name: Create Pull Request With Versions Bumped
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
uses: tauri-apps/create-pull-request@v3.4.1
|
||||
|
||||
@@ -4,6 +4,36 @@
|
||||
"rust": {
|
||||
"version": true,
|
||||
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
||||
"prepublish": [
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0",
|
||||
"cargo install cargo-audit",
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Cargo Audit\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "cargo audit ${ process.env.CARGO_AUDIT_OPTIONS || '' }",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"command": "cargo package --allow-dirty",
|
||||
@@ -66,7 +96,9 @@
|
||||
"tauri-plugin-{{ plugin_name }}-api": {
|
||||
"path": ".",
|
||||
"manager": "javascript",
|
||||
"dependencies": ["tauri-plugin-{{ plugin_name }}"]
|
||||
"dependencies": [
|
||||
"tauri-plugin-{{ plugin_name }}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,15 @@ jobs:
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- 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 }}"
|
||||
|
||||
- name: covector version-or-publish
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
id: covector
|
||||
@@ -28,6 +33,7 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
command: 'version-or-publish'
|
||||
createRelease: true
|
||||
|
||||
- name: Create Pull Request With Versions Bumped
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
uses: tauri-apps/create-pull-request@v3.4.1
|
||||
|
||||
Reference in New Issue
Block a user