From 12d84ed434406505a12e39d12dae2e7514e847fa Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 30 Jul 2024 16:39:57 -0300 Subject: [PATCH] chore: setup covector, initial release --- .changes/config.json | 27 ++++++++++ .changes/initial-release.md | 6 +++ .changes/pre.json | 6 +++ .changes/readme.md | 31 +++++++++++ .github/workflows/covector-status.yml | 18 +++++++ .../workflows/covector-version-or-publish.yml | 54 +++++++++++++++++++ Cargo.toml | 1 - crates/tauri-plugin-core/CHANGELOG.md | 5 ++ crates/tauri-plugin-core/Cargo.toml | 2 +- crates/tauri-plugin-tauri/CHANGELOG.md | 5 ++ crates/tauri-plugin-tauri/Cargo.toml | 2 +- 11 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 .changes/config.json create mode 100644 .changes/initial-release.md create mode 100644 .changes/pre.json create mode 100644 .changes/readme.md create mode 100644 .github/workflows/covector-status.yml create mode 100644 .github/workflows/covector-version-or-publish.yml create mode 100644 crates/tauri-plugin-core/CHANGELOG.md create mode 100644 crates/tauri-plugin-tauri/CHANGELOG.md diff --git a/.changes/config.json b/.changes/config.json new file mode 100644 index 0000000..6da86c9 --- /dev/null +++ b/.changes/config.json @@ -0,0 +1,27 @@ +{ + "gitSiteUrl": "https://github.com/tauri-apps/reserved-plugins/", + "pkgManagers": { + "rust": { + "version": true, + "getPublishedVersion": { + "use": "fetch:check", + "options": { + "url": "https://crates.io/api/v1/crates/${ pkg.pkg }/${ pkg.pkgFile.version }" + } + }, + "publish": [ + "cargo publish --no-verify --allow-dirty" + ] + } + }, + "packages": { + "core": { + "path": "./crates/tauri-plugin-core", + "manager": "rust" + }, + "tauri": { + "path": "./crates/tauri-plugin-tauri", + "manager": "rust" + } + } +} \ No newline at end of file diff --git a/.changes/initial-release.md b/.changes/initial-release.md new file mode 100644 index 0000000..2d94c8d --- /dev/null +++ b/.changes/initial-release.md @@ -0,0 +1,6 @@ +--- +"core": patch +"tauri": patch +--- + +Initial release. diff --git a/.changes/pre.json b/.changes/pre.json new file mode 100644 index 0000000..21db5e4 --- /dev/null +++ b/.changes/pre.json @@ -0,0 +1,6 @@ +{ + "tag": "beta", + "changes": [ + ".changes/initial-release.md" + ] +} diff --git a/.changes/readme.md b/.changes/readme.md new file mode 100644 index 0000000..5c2b35e --- /dev/null +++ b/.changes/readme.md @@ -0,0 +1,31 @@ +# 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). diff --git a/.github/workflows/covector-status.yml b/.github/workflows/covector-status.yml new file mode 100644 index 0000000..9c357bf --- /dev/null +++ b/.github/workflows/covector-status.yml @@ -0,0 +1,18 @@ +name: covector status +on: [pull_request] + +jobs: + covector: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # required for use of git history + - name: covector status + uses: jbolda/covector/packages/action@covector-v0.12 + id: covector + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: 'status' + comment: true diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml new file mode 100644 index 0000000..8d0fe5f --- /dev/null +++ b/.github/workflows/covector-version-or-publish.yml @@ -0,0 +1,54 @@ +name: version or publish + +on: + push: + branches: + - dev + +permissions: + # required for npm provenance + id-token: write + # required to create the GitHub Release + contents: write + # required for creating the Version Packages Release + pull-requests: write + +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@v4 + with: + fetch-depth: 0 # required for use of git history + - 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.12 + id: covector + env: + CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: "version-or-publish" + createRelease: true + recognizeContributors: true + - name: Create Pull Request With Versions Bumped + id: cpr + uses: peter-evans/create-pull-request@v6 + 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 }} diff --git a/Cargo.toml b/Cargo.toml index 3d2e75e..b4753d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ resolver = "2" members = ["crates/*"] [workspace.package] -version = "2.0.0-beta.0" authors = ["Tauri Programme within The Commons Conservancy"] homepage = "https://tauri.app/" repository = "https://github.com/tauri-apps/tauri-plugin-core" diff --git a/crates/tauri-plugin-core/CHANGELOG.md b/crates/tauri-plugin-core/CHANGELOG.md new file mode 100644 index 0000000..d826f56 --- /dev/null +++ b/crates/tauri-plugin-core/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## \[2.0.0-beta.0] + +- [\`\`](https://github.com/tauri-apps/reserved-plugins/commit/undefined) Initial release. diff --git a/crates/tauri-plugin-core/Cargo.toml b/crates/tauri-plugin-core/Cargo.toml index 72dddbf..f561eb3 100644 --- a/crates/tauri-plugin-core/Cargo.toml +++ b/crates/tauri-plugin-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-core" -version.workspace = true +version = "2.0.0-beta.0" authors.workspace = true homepage.workspace = true repository.workspace = true diff --git a/crates/tauri-plugin-tauri/CHANGELOG.md b/crates/tauri-plugin-tauri/CHANGELOG.md new file mode 100644 index 0000000..d826f56 --- /dev/null +++ b/crates/tauri-plugin-tauri/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## \[2.0.0-beta.0] + +- [\`\`](https://github.com/tauri-apps/reserved-plugins/commit/undefined) Initial release. diff --git a/crates/tauri-plugin-tauri/Cargo.toml b/crates/tauri-plugin-tauri/Cargo.toml index 10bc0db..8a32e37 100644 --- a/crates/tauri-plugin-tauri/Cargo.toml +++ b/crates/tauri-plugin-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-tauri" -version.workspace = true +version = "2.0.0-beta.0" authors.workspace = true homepage.workspace = true repository.workspace = true