-
Notifications
You must be signed in to change notification settings - Fork 37
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
1 parent
d348a6f
commit 6ab40ce
Showing
5 changed files
with
88 additions
and
6 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,82 @@ | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
name: Build and Release | ||
|
||
jobs: | ||
build-releases: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache build artifacts | ||
id: cache-cargo | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: build-${{ runner.os }}-cargo-any | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2021-01-07 | ||
components: rustfmt | ||
override: true | ||
|
||
- name: Install cross-compilation tools (if needed) | ||
run: which cross >/dev/null || cargo install cross | ||
|
||
- name: Verify versions | ||
run: rustc --version && rustup --version && cargo --version && cross --version | ||
|
||
- name: Get current tag | ||
id: current_tag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
|
||
- name: Release binaries | ||
run: ./scripts/release_binaries.sh --version=${{ steps.current_tag.outputs.tag }} | ||
|
||
- name: Release new version | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.current_tag.outputs.tag }} | ||
name: Raider ${{ steps.current_tag.outputs.tag }} | ||
body: "⚠️ Changelog not yet provided." | ||
files: ./${{ steps.current_tag.outputs.tag }}-*.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Acquire Docker image metadata | ||
id: metadata | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: valeriansaliou/raider | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
push: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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