diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/check_test_rustfmt_clippy.yaml | 40 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 45 |
2 files changed, 85 insertions, 0 deletions
diff --git a/.github/workflows/check_test_rustfmt_clippy.yaml b/.github/workflows/check_test_rustfmt_clippy.yaml new file mode 100644 index 0000000..9cb63c1 --- /dev/null +++ b/.github/workflows/check_test_rustfmt_clippy.yaml | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | on: push | ||
| 2 | |||
| 3 | name: check test rustfmt clippy | ||
| 4 | |||
| 5 | jobs: | ||
| 6 | ci: | ||
| 7 | runs-on: ubuntu-latest | ||
| 8 | strategy: | ||
| 9 | matrix: | ||
| 10 | rust: | ||
| 11 | - stable | ||
| 12 | - nightly | ||
| 13 | |||
| 14 | steps: | ||
| 15 | - uses: actions/checkout@v2 | ||
| 16 | |||
| 17 | - uses: actions-rs/toolchain@v1 | ||
| 18 | with: | ||
| 19 | profile: minimal | ||
| 20 | toolchain: ${{ matrix.rust }} | ||
| 21 | override: true | ||
| 22 | components: rustfmt, clippy | ||
| 23 | |||
| 24 | - uses: actions-rs/cargo@v1 | ||
| 25 | with: | ||
| 26 | command: build | ||
| 27 | |||
| 28 | - uses: actions-rs/cargo@v1 | ||
| 29 | with: | ||
| 30 | command: test | ||
| 31 | |||
| 32 | - uses: actions-rs/cargo@v1 | ||
| 33 | with: | ||
| 34 | command: fmt | ||
| 35 | args: --all -- --check | ||
| 36 | |||
| 37 | - uses: actions-rs/cargo@v1 | ||
| 38 | with: | ||
| 39 | command: clippy | ||
| 40 | args: -- -D warnings | ||
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7e64456 --- /dev/null +++ b/.github/workflows/release.yml | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | name: Release | ||
| 2 | |||
| 3 | permissions: | ||
| 4 | contents: write | ||
| 5 | |||
| 6 | on: | ||
| 7 | push: | ||
| 8 | tags: | ||
| 9 | - v[0-9]+.* | ||
| 10 | |||
| 11 | jobs: | ||
| 12 | create-release: | ||
| 13 | runs-on: ubuntu-latest | ||
| 14 | steps: | ||
| 15 | - uses: actions/checkout@v3 | ||
| 16 | - uses: taiki-e/create-gh-release-action@v1 | ||
| 17 | with: | ||
| 18 | # (required) GitHub token for creating GitHub Releases. | ||
| 19 | token: ${{ secrets.GITHUB_TOKEN }} | ||
| 20 | |||
| 21 | upload-assets: | ||
| 22 | strategy: | ||
| 23 | matrix: | ||
| 24 | os: | ||
| 25 | - ubuntu-latest | ||
| 26 | - macos-latest | ||
| 27 | - windows-latest | ||
| 28 | runs-on: ${{ matrix.os }} | ||
| 29 | steps: | ||
| 30 | - uses: actions/checkout@v3 | ||
| 31 | - uses: taiki-e/upload-rust-binary-action@v1 | ||
| 32 | with: | ||
| 33 | # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. | ||
| 34 | # Note that glob pattern is not supported yet. | ||
| 35 | bin: ngit | ||
| 36 | # (optional) On which platform to distribute the `.tar.gz` file. | ||
| 37 | # [default value: unix] | ||
| 38 | # [possible values: all, unix, windows, none] | ||
| 39 | tar: unix | ||
| 40 | # (optional) On which platform to distribute the `.zip` file. | ||
| 41 | # [default value: windows] | ||
| 42 | # [possible values: all, unix, windows, none] | ||
| 43 | zip: windows | ||
| 44 | # (required) GitHub token for uploading assets to GitHub Releases. | ||
| 45 | token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file | ||