Update Crate #264
This file contains hidden or 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
name: Update Crate | |
on: | |
schedule: | |
- cron: "0 0 * * 0" # every Sunday at midnight | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
clean: false | |
fetch-depth: 0 # needed to push tags later | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install cargo-release | |
run: | | |
if ! command -v cargo-release &> /dev/null; then | |
cargo install cargo-release | |
fi | |
- name: Build | |
env: | |
APILAYER_KEY: ${{ secrets.APILAYER_KEY }} | |
run: | | |
cd ua_generator | |
BUILD_ENABLED=1 cargo build | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
message: "chore(agents): bump minor version and publish" | |
committer_name: UA Generator | |
author_name: UA Generator | |
author_email: support@spider.cloud | |
add: "." | |
pull: "--rebase --autostash" | |
- name: Release | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
APILAYER_KEY: ${{ secrets.APILAYER_KEY }} | |
run: | | |
cd ua_generator | |
cargo release minor --no-confirm | |
- name: Push tags | |
run: git push --follow-tags |