Skip to content

Commit

Permalink
ci: fix macos build worklow error
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Aug 30, 2022
1 parent 363a83e commit 864582a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release-for-mac.yml
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 }}
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
Expand Down

0 comments on commit 864582a

Please sign in to comment.