Skip to content

Commit

Permalink
chore(actions): simplify publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbrendel committed Dec 22, 2023
1 parent e1775ae commit abbca7a
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
name: Publish

on:
push:
branches:
- master
workflow_run:
workflows: Rust
branches: master
types: completed

env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
rust-channel: [ 'stable', 'nightly' ]
rust-target: [ 'x86_64-unknown-linux-gnu', 'thumbv7em-none-eabi' ]
name: ${{ matrix.rust-channel }}-${{ matrix.rust-target }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Install toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-channel }}
target: ${{ matrix.rust-target }}
- name: Cargo Check
run: cargo check --target ${{ matrix.rust-target }}
- name: Cargo Build
run: cargo build --verbose --target ${{ matrix.rust-target }}

release-please:
name: Execute release chores

Expand All @@ -36,7 +18,6 @@ jobs:
pull-requests: write

runs-on: ubuntu-latest
needs: build

outputs:
created: ${{ steps.release.outputs.release_created }}
Expand Down Expand Up @@ -67,4 +48,4 @@ jobs:
cargo publish
--verbose
--locked
--token ${{ secrets.CRATES_TOKEN }}
--token ${{ secrets.CRATES_TOKEN }}

0 comments on commit abbca7a

Please sign in to comment.