forked from svartalf/rust-battery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A major cleanup + refactoring of the code to bring it into line with the main starship repo. - release-please and cargo publishing - (Build) testing for more platforms (including FreeBSD, musl and ARM) - Upgraded dependencies - Depdendabot - Clippy fixes - removal of disabled clippy lints - removal of deprecated std-library item (`mem::uninitialized`) - add audit-check to CI Marked as a breaking change because this includes the non-exhaustive removal from svartalf#2.
- Loading branch information
Showing
24 changed files
with
256 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "\U0001F4E6 dependencies" | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "\U0001F4E6 dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_RETRY: 10 | ||
RUST_BACKTRACE: short | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
jobs: | ||
# Update release PR | ||
release_please: | ||
name: Release Please | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'starship/rust-battery' | ||
outputs: | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: rust | ||
|
||
# Publish starship-battery to Crates.io | ||
cargo_publish: | ||
name: Publish Cargo Package | ||
runs-on: ubuntu-latest | ||
needs: release_please | ||
if: ${{ needs.release_please.outputs.release_created == 'true' }} | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v3.0.2 | ||
|
||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: Build | Publish | ||
run: cargo publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Auto-merge Dependabot PRs | ||
on: | ||
schedule: | ||
- cron: "0 * * * *" | ||
jobs: | ||
auto_merge: | ||
if: (github.event_name == 'schedule' && github.repository == 'starship/rust-battery') || (github.event_name != 'schedule') | ||
name: Auto-merge Dependabot PRs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: akheron/dependabot-cron-action@d020867c009553e279f0200b621459444828a9b0 | ||
with: | ||
token: ${{ secrets.DEPENDABOT_GITHUB_API_TOKEN }} | ||
auto-merge: "minor" | ||
merge-method: "squash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Security audit | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/Cargo.toml" | ||
- "**/Cargo.lock" | ||
push: | ||
paths: | ||
- "**/Cargo.toml" | ||
- "**/Cargo.lock" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
security_audit: | ||
if: (github.event_name == 'schedule' && github.repository == 'starship/rust-battery') || (github.event_name != 'schedule') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
- name: Test | Security Audit | ||
uses: actions-rs/audit-check@v1.2.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.