Skip to content

1.1.2

1.1.2 #13

Workflow file for this run

name: Publish
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.72.1
jobs:
validate:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4 # v4
- uses: MeilCli/regex-match@v1
name: SemVer Validation
id: regex-match
with:
search_string: ${{ github.event.release.tag_name }}
regex_pattern: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
# SemVer Regex https://ihateregex.io/expr/semver/
- name: SemVer check failed
if: ${{ steps.regex-match.outputs.matched == 'false' }}
run: exit 1
publish:
runs-on: ubuntu-22.04
needs: [validate]
steps:
- uses: actions/checkout@v4 # v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Google Storage authentication
uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
export_environment_variables: true
create_credentials_file: true
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Install dependencies ubuntu
run: make install-deps
- uses: katyo/publish-crates@v2
with:
dry-run: ${{ github.event_name != 'release' }}
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}