-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from Veetaha/feat/github-action
Add a github action
- Loading branch information
Showing
9 changed files
with
258 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Rust Marker Linter | ||
description: GitHub Action to install and run the Marker linter for Rust 🦀 | ||
branding: | ||
icon: edit-3 | ||
color: white | ||
|
||
inputs: | ||
install-only: | ||
description: > | ||
If set to `true` then the action will only install `cargo marker`, | ||
and will skip running `cargo marker`. Use this if you want to run | ||
something more complex than just `cargo marker`. If you think there | ||
may be a frequent use case for running a different command then we will be | ||
glad if you open a feature request issue for that to extend the action input | ||
parameters. | ||
default: 'false' | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: ${GITHUB_ACTION_PATH:?}/scripts/release/install.${{ runner.os == 'Windows' && 'ps1' || 'sh' }} | ||
shell: bash | ||
|
||
- run: cargo marker | ||
if: ${{ inputs.install-only == 'false' }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
version="$1" | ||
|
||
IFS='.' read -r major minor patch <<< "$version" | ||
|
||
# We always put the full version tag even if this is a pre-release | ||
echo -n "v$version" | ||
|
||
# For suffixless stable release versions we also want to set the | ||
# sliding `v{major}` and `v{major}.{minor}` tags so that uses could | ||
# depend on `rust-marker/marker@v0.3` or `rust-marker/marker@v1` | ||
# version of the Github Action. | ||
if [[ "$version" != *-* ]]; then | ||
echo -n " v$major v$major.$minor" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.