Skip to content

Update and simplify workflows #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
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
51 changes: 18 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Cargo

on: [push, pull_request]

Expand All @@ -9,38 +9,23 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v4
- run: cargo build --verbose

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build Code
run: cargo build --verbose

- name: Test Code
run: cargo test --verbose
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo test --verbose

- name: Get Branch Name
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
id: branch_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo fmt --check

- name: Create Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.branch_name.outputs.SOURCE_TAG }}
draft: false
prerelease: false
clippy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy
25 changes: 0 additions & 25 deletions .github/workflows/clippy.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/format.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release-create:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1