Skip to content

Use chrono for datetimes. #55

Use chrono for datetimes.

Use chrono for datetimes. #55

Workflow file for this run

# Displays in the badge in Readme.md
name: Latest SDK Build
on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- run: cargo -V
- run: cargo build # --verbose --frozen
- run: cargo test --verbose
- run: cargo publish --dry-run
- name: Create Github Release and Tag
if: github.repository_owner == 'Authress' && github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
branchId="${GITHUB_REF/refs\/heads\/release\//}"
export VERSION="${branchId}.${GITHUB_RUN_NUMBER}"
sed -i "s/0.0.0/${VERSION}/g" ./Cargo.toml -i
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo Building version: ${{ env.VERSION }}
git tag $VERSION
git push origin $VERSION
- name: Publish crates.io
if: github.repository_owner == 'Authress' && github.ref != 'refs/heads/main' && github.event_name == 'push'
# We allow dirty because we will be including the dynamic version in the publishing
run: cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}