Mercurial > crates > nonstick
diff .github/workflows/build.yml @ 43:60e74d6a2b88
Merge pull request #10 from Nigma1337/master
Automate crate publishing
author | Anthony Nowell <anowell@gmail.com> |
---|---|
date | Mon, 29 Aug 2022 14:32:28 -0700 |
parents | 80d496e87f8f |
children |
line wrap: on
line diff
--- a/.github/workflows/build.yml Wed Jun 08 09:28:13 2022 -0700 +++ b/.github/workflows/build.yml Mon Aug 29 14:32:28 2022 -0700 @@ -1,22 +1,19 @@ on: - pull_request: + push: branches: - master workflow_call: -name: Build +name: Build & publish jobs: - check: - name: Check & Lint + build: runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - - name: Install PAM dev files run: sudo apt-get install -y libpam0g-dev - - name: Use cargo cache uses: actions/cache@v2 with: @@ -27,48 +24,18 @@ ~/.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: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check - args: --manifest-path pam/Cargo.toml - - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path pam/Cargo.toml - - - name: Run cargo check on pam-http - uses: actions-rs/cargo@v1 + - name: Publish module + uses: katyo/publish-crates@v1 with: - command: check - args: --manifest-path pam-http/Cargo.toml - - - name: Run cargo check on pam-sober - uses: actions-rs/cargo@v1 - with: - command: check - args: --manifest-path pam-sober/Cargo.toml - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path pam/Cargo.toml --all --check - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --manifest-path pam/Cargo.toml -- -D warnings - - + 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 + path: pam + args: --package pam-bindings \ No newline at end of file