ci: set up covector (#329)

* ci: set up covector

* remove postpublish

* push new tags to mirrors

* fetch tags of current repo in workflow file

* use our fork of create-pull-request action

* fmt

* use org tokens

* simplify string subst

* fmt again
pull/328/head
Fabian-Lars 2 years ago committed by GitHub
parent 9e97a55d85
commit 3fddf476de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,171 @@
{
"gitSiteUrl": "https://github.com/tauri-apps/plugins-workspace/",
"pkgManagers": {
"javascript": {
"version": true,
"getPublishedVersion": "pnpm view ${ pkgFile.pkg.name } version",
"publish": ["pnpm build", "pnpm publish --access public --no-git-checks"]
},
"rust": {
"version": true,
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
"publish": [
{
"command": "cargo package --no-verify",
"dryRunCommand": true
},
{
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "cargo publish",
"dryRunCommand": "cargo publish --dry-run",
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
]
}
},
"packages": {
"authenticator": {
"path": "./plugins/authenticator",
"manager": ""
},
"authenticator-js": {
"path": "./plugins/authenticator",
"manager": ""
},
"autostart": {
"path": "./plugins/autostart",
"manager": ""
},
"autostart-js": {
"path": "./plugins/autostart",
"manager": ""
},
"fs-extra": {
"path": "./plugins/fs-extra",
"manager": ""
},
"fs-extra-js": {
"path": "./plugins/fs-extra",
"manager": ""
},
"fs-watch": {
"path": "./plugins/fs-watch",
"manager": ""
},
"fs-watch-js": {
"path": "./plugins/fs-watch",
"manager": ""
},
"localhost": {
"path": "./plugins/localhost",
"manager": "rust"
},
"localhost-js": {
"path": "./plugins/localhost",
"manager": ""
},
"log": {
"path": "./plugins/log",
"manager": ""
},
"log-js": {
"path": "./plugins/log",
"manager": ""
},
"persisted-scope": {
"path": "./plugins/persisted-scope",
"manager": "rust"
},
"persisted-scope-js": {
"path": "./plugins/persisted-scope",
"manager": ""
},
"positioner": {
"path": "./plugins/positioner",
"manager": "rust"
},
"positioner-js": {
"path": "./plugins/positioner",
"manager": ""
},
"single-instance": {
"path": "./plugins/single-instance",
"manager": ""
},
"single-instance-js": {
"path": "./plugins/single-instance",
"manager": ""
},
"sql": {
"path": "./plugins/sql",
"manager": ""
},
"sql-js": {
"path": "./plugins/sql",
"manager": ""
},
"store": {
"path": "./plugins/store",
"manager": ""
},
"store-js": {
"path": "./plugins/store",
"manager": ""
},
"stronghold": {
"path": "./plugins/stronghold",
"manager": ""
},
"stronghold-js": {
"path": "./plugins/stronghold",
"manager": ""
},
"upload": {
"path": "./plugins/upload",
"manager": ""
},
"upload-js": {
"path": "./plugins/upload",
"manager": ""
},
"websocket": {
"path": "./plugins/websocket",
"manager": ""
},
"websocket-js": {
"path": "./plugins/websocket",
"manager": ""
},
"window-state": {
"path": "./plugins/window-state",
"manager": "rust"
},
"window-state-js": {
"path": "./plugins/window-state",
"manager": ""
}
}
}

@ -0,0 +1,30 @@
# Changes
##### via https://github.com/jbolda/covector
As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
Use the following format:
```md
---
"package-a": patch
"package-b": minor
---
Change summary goes here
```
Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).

@ -60,6 +60,9 @@ fi
# : > "$BUILD_BASE/changes.diff"
# Collect tags of current commit
readarray -t COMMIT_TAGS < <(git tag --points-at HEAD)
EXIT=0
while read -r PLUGIN_NAME; do
printf "\n\n\e[7m Mirror: %s \e[0m\n" "$PLUGIN_NAME"
@ -106,6 +109,17 @@ while read -r PLUGIN_NAME; do
# echo "$BUILD_BASE/changes.diff"
# git show --pretty= --src-prefix="a/$PLUGIN_NAME/" --dst-prefix="b/$PLUGIN_NAME/" >> "$BUILD_BASE/changes.diff"
echo "https://github.com/tauri-apps/tauri-plugin-$PLUGIN_NAME/commit/$(git rev-parse HEAD)"
# Add new tags
for FULL_TAG in "${COMMIT_TAGS[@]}"; do
if [[ "$FULL_TAG" =~ ^"tauri-plugin-$PLUGIN_NAME-" ]]; then
TAG_NAME="${FULL_TAG#"tauri-plugin-$PLUGIN_NAME-"}"
echo "Creating tag $TAG_NAME"
git tag "${TAG_NAME}" -m "${GIT_CLI_COMMIT_MESSAGE}"
git push origin "${TAG_NAME}"
fi
done
echo "Completed $PLUGIN_NAME"
else
echo "::error::Commit of ${PLUGIN_NAME} failed"

@ -0,0 +1,16 @@
name: covector status
on: [pull_request]
jobs:
covector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for use of git history
- name: covector status
uses: jbolda/covector/packages/action@covector-v0.8
id: covector
with:
command: "status"

@ -0,0 +1,59 @@
name: version or publish
on:
push:
branches:
- dev
jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: true
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_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 (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0.8
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "version-or-publish"
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: tauri-apps/create-pull-request@v3
if: steps.covector.outputs.commandRan == 'version'
with:
title: "Publish New Versions"
commit-message: "publish new versions"
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}

@ -15,6 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Cache pnpm modules
uses: actions/cache@v3
with:
@ -22,15 +26,19 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: true
- name: Build packages
run: pnpm build
- name: Sync
run: .github/sync-to-mirrors.sh
env:

24
Cargo.lock generated

@ -4284,7 +4284,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-authenticator"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"authenticator",
"base64 0.21.0",
@ -4303,7 +4303,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-autostart"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"auto-launch",
"log",
@ -4315,7 +4315,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs-extra"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"log",
"serde",
@ -4326,7 +4326,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs-watch"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"log",
"notify",
@ -4352,7 +4352,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-log"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"byte-unit",
"fern",
@ -4378,7 +4378,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-positioner"
version = "0.2.7"
version = "1.0.4"
dependencies = [
"log",
"serde",
@ -4390,7 +4390,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-single-instance"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"log",
"serde",
@ -4403,7 +4403,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-sql"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"futures-core",
"log",
@ -4418,7 +4418,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-store"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"log",
"serde",
@ -4429,7 +4429,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-stronghold"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"hex",
"iota-crypto 0.17.0",
@ -4446,7 +4446,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-upload"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"futures-util",
"log",
@ -4462,7 +4462,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-websocket"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"futures-util",
"log",

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-authenticator"
version = "0.1.0"
version = "0.0.0"
description = "Use hardware security-keys in your Tauri App."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
version = "0.1.0"
version = "0.0.0"
description = "Automatically launch your application at startup."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs-extra"
version = "0.1.0"
version = "0.0.0"
description = "Additional file system methods not included in the core API."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs-watch"
version = "0.1.0"
version = "0.0.0"
description = "Watch files and directories for changes."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-log"
version = "0.1.0"
version = "0.0.0"
description = "Configurable logging for your Tauri app."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-positioner"
version = "0.2.7"
version = "1.0.4"
description = "Position your windows at well-known locations."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
{
"name": "tauri-plugin-positioner-api",
"version": "0.0.0",
"version": "0.2.7",
"description": "Position your windows at well-known locations.",
"license": "MIT or APACHE-2.0",
"authors": [

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-single-instance"
version = "0.1.0"
version = "0.0.0"
description = "Ensure a single instance of your tauri app is running."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-sql"
version = "0.1.0"
version = "0.0.0"
description = "Interface with SQL databases."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-store"
version = "0.1.0"
version = "0.0.0"
description = "Simple, persistent key-value store."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-stronghold"
version = "0.1.0"
version = "0.0.0"
description = "Store secrets and keys using the IOTA Stronghold encrypted database."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-upload"
version = "0.1.0"
version = "0.0.0"
description = "Upload files from disk to a remote server over HTTP."
authors.workspace = true
license.workspace = true

@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-websocket"
version = "0.1.0"
version = "0.0.0"
authors.workspace = true
license.workspace = true
edition.workspace = true

@ -1,6 +1,6 @@
{
"name": "tauri-plugin-window-state-api",
"version": "0.1.0",
"version": "0.0.0",
"description": "Save window positions and sizes and restore them when the app is reopened.",
"license": "MIT or APACHE-2.0",
"authors": [

Loading…
Cancel
Save