-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 86df8da
Showing
9 changed files
with
1,503 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: actionlint | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/**' | ||
|
||
jobs: | ||
actionlint: | ||
name: runner / actionlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: actionlint | ||
uses: reviewdog/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-review | ||
filter_mode: nofilter | ||
fail_on_error: true |
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,118 @@ | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y gcc-mingw-w64-x86-64 | ||
- uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
target: x86_64-unknown-linux-gnu | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
target: x86_64-pc-windows-gnu | ||
|
||
- name: cache dependencies | ||
uses: Swatinem/[email protected] | ||
|
||
- name: clippy check | ||
uses: actions-rs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
|
||
- name: install cargo-license | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: install | ||
args: cargo-license | ||
|
||
- name: compile for unit test | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-run --locked | ||
|
||
- name: unit test | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --release --target x86_64-unknown-linux-gnu | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
command: build | ||
args: --release --target x86_64-pc-windows-gnu | ||
|
||
- run: | | ||
mkdir http-request-duplicator | ||
cargo license \ | ||
--authors \ | ||
--do-not-bundle \ | ||
--avoid-dev-deps \ | ||
--avoid-build-deps \ | ||
--filter-platform x86_64-pc-windows-gnu \ | ||
> http-request-duplicator/CREDITS | ||
VERSION_NAME=${GITHUB_REF##*/} | ||
if [[ $VERSION_NAME == "master" ]]; then | ||
VERSION_NAME=$(git rev-parse --short HEAD) | ||
elif [[ ${VERSION_NAME:0:1} == "v" ]]; then | ||
VERSION_NAME=${VERSION_NAME:1} | ||
fi | ||
echo "$VERSION_NAME" > http-request-duplicator/VERSION.txt | ||
cp LICENSE README.md http-request-duplicator/ | ||
cp target/x86_64-pc-windows-gnu/release/http-request-duplicator.exe http-request-duplicator/ | ||
zip -r http-request-duplicator-windows.zip http-request-duplicator | ||
rm http-request-duplicator/*.exe | ||
cargo license \ | ||
--authors \ | ||
--do-not-bundle \ | ||
--avoid-dev-deps \ | ||
--avoid-build-deps \ | ||
--filter-platform x86_64-unknown-linux-gnu \ | ||
> http-request-duplicator/CREDITS | ||
cp target/x86_64-unknown-linux-gnu/release/http-request-duplicator http-request-duplicator/ | ||
zip -r http-request-duplicator-linux.zip http-request-duplicator | ||
- name: pre-release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
if: "! startsWith(github.ref, 'refs/tags/')" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Development Build" | ||
files: | | ||
http-request-duplicator-windows.zip | ||
http-request-duplicator-linux.zip | ||
- name: tagged-release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
http-request-duplicator-windows.zip | ||
http-request-duplicator-linux.zip |
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,45 @@ | ||
name: Review | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'src/**' | ||
- 'Cargo.toml' | ||
- 'Cargo.lock' | ||
- '.github/workflows/review.yml' | ||
|
||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
|
||
jobs: | ||
rust: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
|
||
- name: cache dependencies | ||
uses: Swatinem/[email protected] | ||
|
||
- name: clippy check | ||
uses: actions-rs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
|
||
- name: compile for unit test | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --no-run --locked | ||
|
||
- name: unit test | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test |
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 @@ | ||
/target |
Oops, something went wrong.