Skip to content

Commit

Permalink
chore: prepare repo to be published
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 16, 2024
1 parent b94e08c commit 7a3f39e
Show file tree
Hide file tree
Showing 9 changed files with 7,388 additions and 13 deletions.
52 changes: 49 additions & 3 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,54 @@
"pkgManagers": {
"rust": {
"version": true,
"publish": true,
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -"
"getPublishedVersion": {
"use": "fetch:check",
"options": {
"url": "https://crates.io/api/v1/crates/${ pkg.pkgFile.pkg.package.name }/${ pkg.pkgFile.version }"
}
},
"prepublish": [
"cargo install cargo-audit --features=fix",
{
"command": "cargo generate-lockfile",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": true
},
{
"command": "echo '<details>\n<summary><em><h4>Cargo Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "cargo audit ${ process.env.CARGO_AUDIT_OPTIONS || '' }",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": true
},
{
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
],
"publish": [
{
"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": {
Expand All @@ -13,4 +59,4 @@
"manager": "rust"
}
}
}
}
12 changes: 10 additions & 2 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,27 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- 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: install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: covector version-or-publish
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
command: "version-or-publish"
createRelease: true

- name: create pull request
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
Cargo.lock
Loading

0 comments on commit 7a3f39e

Please sign in to comment.