Skip to content

chore(deps): bump tokio from 1.52.1 to 1.52.2 #187

chore(deps): bump tokio from 1.52.1 to 1.52.2

chore(deps): bump tokio from 1.52.1 to 1.52.2 #187

---
name: Release and Cargo publish
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-test:
name: Build and test (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: swatinem/rust-cache@v2
- name: Build
run: >
cargo build
--locked
- name: Run fmt check
run: >
cargo fmt --
--check
- name: Run tests
run: >
cargo test
release-please:
name: Execute release chores
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@v5
id: release
with:
token: ${{ steps.app-token.outputs.token }}
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
outputs:
created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.created
environment: crates.io
steps:
- uses: actions/checkout@v6
- name: Publish
run: >
cargo publish
--locked
--token ${{ secrets.CARGO_API_KEY }}
github-release:
name: GitHub release (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: release-please
if: needs.release-please.outputs.created
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
rust: [stable]
include:
- os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
- os: ubuntu-latest
artifact_prefix: linux
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v6
- name: Set toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Cargo build
run: >
cargo build
--release
--target ${{ matrix.target }}
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
strip rslack
tar czvf rslack-${{ matrix.artifact_prefix }}.tar.gz rslack
shasum -a 256 rslack-${{ matrix.artifact_prefix }}.tar.gz > rslack-${{ matrix.artifact_prefix }}.sha256
- name: Releasing assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-please.outputs.tag_name }} target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.tar.gz
gh release upload ${{ needs.release-please.outputs.tag_name }} target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.sha256