view .github/workflows/build.yml @ 39:4a0b7b73b70f

retry part two
author Nigma <magnusgsvend@gmail.com>
date Sun, 24 Jul 2022 02:10:12 +0200
parents a132009ecc5c
children 75c4bd0b2769
line wrap: on
line source

on:
  push:
    branches:
      - master
  workflow_call:

name: Build & publish

jobs:
  build:
  runs-on: ubuntu-latest
  steps:
    - name: Use cargo cache
      uses: actions/cache@v2
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
    - name: Install stable toolchain
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true
    - name: Publish module
      uses: katyo/publish-crates@v1
      with:
        registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        check-repo: ${{ github.event_name == 'push' }}
        ignore-unpublished-changes: true
        # Only publish pam module, as pam-http and pam-sober are example projects
        args: --package pam-bindings