Skip to content

Fiat Cryptography v0.1.1 #33

Fiat Cryptography v0.1.1

Fiat Cryptography v0.1.1 #33

Workflow file for this run

name: Publish
on:
release:
types: [published] # Only publish to crates.io when we formally publish a release
# For more on how to formally release on Github, read https://help.github.com/en/articles/creating-releases
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Login to crates.io
run: cargo login $CRATES_IO_TOKEN
env:
CRATES_IO_TOKEN: ${{ secrets.crates_io_token }} # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
- name: Dry run publish
run: cargo publish --dry-run --manifest-path fiat-rust/Cargo.toml
- name: Publish
run: cargo publish --manifest-path fiat-rust/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}
- name: Bump Rust crate version
id: bumpRustViaPush
run: |
etc/ci/bump-fiat-rust-crate-version.sh
remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git config http.sslVerify false
git config user.name "Automated Publisher"
git config user.email "[email protected]"
git remote add publisher "${remote_repo}"
git remote update
git show-ref # useful for debugging
git branch --verbose
git checkout -b temp
git branch -D master || true
git checkout -b master publisher/master
git add fiat-rust/Cargo.toml
timestamp=$(date -u)
git commit -m "Automated Rust Crate Version Bump: ${timestamp} ${GITHUB_SHA}"
git push publisher master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: always()
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: 'Rust Crate Version Bump'
body: >
This PR is auto-generated by
[create-pull-request](https://github.com/peter-evans/create-pull-request).
labels: rust, automated pr
if: failure() && steps.bumpRustViaPush.outcome == 'failure'