Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt, rust-src
components: clippy, rustfmt

- name: Test
run: cargo test --all-features --locked --release
run: cargo test --all-features --all-targets --locked --release
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Cargo Binary Install
uses: cargo-bins/cargo-binstall@main

- name: Install crates
run: cargo binstall --force -y cargo-workspaces

- uses: rust-lang/crates-io-auth-action@v1
id: auth

- name: Publish
run: cargo workspaces publish --publish-as-is
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
run: git add .

- name: Commit
id: commit
uses: dsanders11/github-app-commit-action@v1
with:
message: ${{ steps.extract-version.outputs.VERSION }}
Expand All @@ -60,11 +61,18 @@ jobs:
run: git reset --hard && git pull

- name: Tag
uses: bruno-fs/repo-tagger@1.0.0
with:
tag: ${{ steps.extract-version.outputs.VERSION }}
uses: actions/github-script@v8
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GIT_TAG: ${{ steps.extract-version.outputs.VERSION }}
GIT_SHA: ${{ steps.commit.outputs.sha }}
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${process.env.GIT_TAG}`,
sha: process.env.GIT_SHA
})

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -73,6 +81,3 @@ jobs:
make_latest: true
tag_name: ${{ steps.extract-version.outputs.VERSION }}
token: ${{ steps.app-token.outputs.token }}

- name: Publish
run: cargo workspaces publish --publish-as-is --token "${{ secrets.CRATES_IO_TOKEN }}"