-
-
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
Showing
2 changed files
with
40 additions
and
2 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,40 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
name: release x86_64-apple-darwin | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Installing Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: x86_64-apple-darwin | ||
override: true | ||
- name: Checking out sources | ||
uses: actions/checkout@v1 | ||
- name: Running cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
toolchain: stable | ||
args: --locked --release --target x86_64-apple-darwin" | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Packaging final binary | ||
shell: bash | ||
run: | | ||
cd target/x86_64-apple-darwin/release | ||
tar czvf datpiff_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz datpiff | ||
shasum -a 512 datpiff_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz > datpiff_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512 | ||
- name: Releasing assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/x86_64-apple-darwin/release/datpiff_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz | ||
target/x86_64-apple-darwin/release/datpiff_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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