mirror of
https://codeberg.org/JasterV/teatui.git
synced 2026-04-26 18:10:03 +00:00
feat: migrate to woodpecker
This commit is contained in:
parent
5e31cb2654
commit
52f6f0f36f
5 changed files with 35 additions and 135 deletions
17
.github/dependabot.yml
vendored
17
.github/dependabot.yml
vendored
|
|
@ -1,17 +0,0 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for Cargo
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
86
.github/workflows/ci.yml
vendored
86
.github/workflows/ci.yml
vendored
|
|
@ -1,86 +0,0 @@
|
|||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
# ensure that the workflow is only triggered once per PR, subsequent pushes to the PR will cancel
|
||||
# and restart the workflow. See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
fmt:
|
||||
name: fmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: check formatting
|
||||
run: cargo fmt -- --check
|
||||
- name: Cache Cargo dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
clippy:
|
||||
name: clippy
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- name: Run clippy action
|
||||
uses: clechasseur/rs-clippy-check@v5
|
||||
- name: Cache Cargo dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
doc:
|
||||
# run docs generation on nightly rather than stable. This enables features like
|
||||
# https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
|
||||
# API be documented as only available in some specific platforms.
|
||||
name: doc
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install Rust nightly
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
- name: Run cargo doc
|
||||
run: cargo doc --no-deps --all-features
|
||||
env:
|
||||
RUSTDOCFLAGS: --cfg docsrs
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: test ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest]
|
||||
steps:
|
||||
# if your project needs OpenSSL, uncomment this to fix Windows builds.
|
||||
# it's commented out by default as the install command takes 5-10m.
|
||||
# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
# if: runner.os == 'Windows'
|
||||
# - run: vcpkg install openssl:x64-windows-static-md
|
||||
# if: runner.os == 'Windows'
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
# enable this ci template to run regardless of whether the lockfile is checked in or not
|
||||
- name: cargo generate-lockfile
|
||||
if: hashFiles('Cargo.lock') == ''
|
||||
run: cargo generate-lockfile
|
||||
- name: cargo test
|
||||
run: cargo test --all-targets
|
||||
- name: Cache Cargo dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
name: Publish to crates.io
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
jobs:
|
||||
publish-crate:
|
||||
name: Publish to crates.io
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.email "49537445+JasterV@users.noreply.github.com"
|
||||
git config --global user.name "JasterV"
|
||||
- name: Install cargo-edit
|
||||
run: |
|
||||
cargo install cargo-edit
|
||||
- name: Update crate version
|
||||
id: update-version
|
||||
run: |
|
||||
cargo set-version -p teatui $GITHUB_REF_NAME
|
||||
- name: Publish crate
|
||||
run: |
|
||||
# Publish the crate using the updated version from the previous step
|
||||
cargo publish -p teatui --allow-dirty --token ${{ secrets.CRATES_IO_TOKEN }}
|
||||
23
.woodpecker/cd.yml
Normal file
23
.woodpecker/cd.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
when:
|
||||
event: push
|
||||
branch: main
|
||||
|
||||
depends_on:
|
||||
- ci
|
||||
|
||||
steps:
|
||||
- name: Update PR
|
||||
image: jasterv/release-plz-update-pr:latest
|
||||
pull: true
|
||||
settings:
|
||||
token:
|
||||
from_secret: CODEBERG_TOKEN
|
||||
|
||||
- name: Release unpublished crates
|
||||
image: jasterv/rust-magic-release:latest
|
||||
pull: true
|
||||
settings:
|
||||
token:
|
||||
from_secret: CODEBERG_TOKEN
|
||||
crates_io_token:
|
||||
from_secret: CRATES_IO_TOKEN
|
||||
12
.woodpecker/ci.yml
Normal file
12
.woodpecker/ci.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
when:
|
||||
- event: [push, pull_request]
|
||||
branch: main
|
||||
|
||||
steps:
|
||||
lint:
|
||||
image: jasterv/rust-ci:1.93
|
||||
commands:
|
||||
- cargo make -p ci fmt-check
|
||||
- cargo make -p ci clippy
|
||||
- cargo make -p ci deny-check
|
||||
- cargo make -p ci docs
|
||||
Loading…
Reference in a new issue