Skip to content

Commit

Permalink
chore: updating actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbrendel committed Nov 24, 2023
1 parent ebfeb56 commit 999da47
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 69 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions-rust-lang/audit@v1
11 changes: 4 additions & 7 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ on:
push:
branches:
- master

jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/[email protected]
- name: Install Toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 'stable'
target: 'x86_64-unknown-linux-gnu'
- name: Cargo Doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --no-deps --document-private-items
run: cargo doc --verbose --no-deps --document-private-items
74 changes: 35 additions & 39 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
type: string

permissions:
# TODO: once `releases: write` is supported, use it instead.
contents: write

name: Publish

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-release
- uses: oleksiyrudenko/[email protected]
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: release
args: ${{ inputs.version }} --execute --verbose --no-confirm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
type: string

permissions:
# TODO: once `releases: write` is supported, use it instead.
contents: write

name: Publish

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- run: cargo install cargo-release
- uses: tibdex/[email protected]
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_SECRET_KEY }}
- uses: oleksiyrudenko/[email protected]
with:
token: ${{ steps.generate-token.outputs.token }}
- run: cargo release ${{ inputs.version }} --execute --verbose --no-confirm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
15 changes: 4 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ jobs:
name: ${{ matrix.rust-channel }}-${{ matrix.rust-target }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/[email protected]
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-channel }}
target: ${{ matrix.rust-target }}
override: true
- name: Cargo Check
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.rust-target }}
run: cargo check --target ${{ matrix.rust-target }}
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --target ${{ matrix.rust-target }}
run: cargo build --verbose --target ${{ matrix.rust-target }}
17 changes: 5 additions & 12 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


on:
workflow_dispatch:
schedule:
Expand All @@ -11,21 +9,16 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions-rs/cargo@v1
with:
command: install
args: svd2rust
- uses: actions-rs/cargo@v1
with:
command: install
args: form
- uses: actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo install svd2rust
- run: cargo install form
- uses: oleksiyrudenko/[email protected]
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- run: |
rm -r src/
svd2rust -i XMC4300.svd
svd2rust -i XMC4100.svd
mkdir src
form -i lib.rs -o src/
cargo fmt
Expand Down

0 comments on commit 999da47

Please sign in to comment.