Skip to content

Update Crate

Update Crate #260

Workflow file for this run

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: cargo install cargo-release
- 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