tokio-postgres-generic-rustls/.forgejo/workflows/publish.yaml

94 lines
2.5 KiB
YAML
Raw Normal View History

2024-05-03 20:08:13 +00:00
on:
push:
tags:
- 'v*.*.*'
jobs:
clippy:
runs-on: base-image
container:
2024-05-03 22:02:42 +00:00
image: docker.io/asonix/actions-base-image:0.1.20
2024-05-03 20:08:13 +00:00
steps:
-
name: Checkout tokio-postgres-generic-rustls
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Clippy
run: |
cargo clippy --no-default-features -- -D warnings
cargo clippy --all-features -- -D warnings
tests:
runs-on: docker
container:
2024-05-03 22:02:42 +00:00
image: docker.io/asonix/actions-base-image:0.1.20
2024-05-03 20:08:13 +00:00
steps:
-
name: Checkout tokio-postgres-generic-rustls
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Test
run: |
cargo test --no-default-features
cargo test --all-features
build:
needs:
- clippy
- tests
runs-on: docker
container:
2024-05-03 22:02:42 +00:00
image: docker.io/asonix/actions-base-image:0.1.20
2024-05-03 20:08:13 +00:00
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- aarch64-unknown-linux-musl
steps:
-
name: Checkout tokio-postgres-generic-rustls
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Compile tokio-postgres-generic-rustls
run: |
cargo zigbuild --no-default-features --target ${{ matrix.target }}
cargo zigbuild --all-features --target ${{ matrix.target }}
publish-forgejo:
needs: [build]
runs-on: docker
container:
2024-05-03 22:02:42 +00:00
image: docker.io/asonix/actions-base-image:0.1.20
2024-05-03 20:08:13 +00:00
steps:
- uses: actions/forgejo-release@v1
with:
direction: upload
token: ${{ secrets.GITHUB_TOKEN }}
publish-crate:
needs: [build]
runs-on: docker
container:
2024-05-03 22:02:42 +00:00
image: docker.io/asonix/actions-base-image:0.1.20
2024-05-03 20:08:13 +00:00
steps:
-
name: Checkout tokio-postgres-generic-rustls
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Publish Crate
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}