-
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.
release: Zippo v0.1.0
- Loading branch information
0 parents
commit 86b6c58
Showing
6 changed files
with
581 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,89 @@ | ||
name: Build and release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v**" | ||
workflow_dispatch: | ||
|
||
permissions: write-all | ||
|
||
env: | ||
CRATE_NAME: zippo | ||
GITHUB_TOKEN: ${{ github.token }} | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.platform.os_name }} || nightly | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- os_name: linux-x86_64 | ||
os: ubuntu-20.04 | ||
target: x86_64-unknown-linux-musl | ||
bin: zippo-linux-x86_64-musl | ||
- os_name: linux-arm | ||
os: ubuntu-20.04 | ||
target: arm-unknown-linux-musleabi | ||
bin: zippo-linux-arm-musl | ||
- os_name: linux-i686 | ||
os: ubuntu-20.04 | ||
target: i686-unknown-linux-musl | ||
bin: zippo-linux-i686-musl | ||
skip_tests: true | ||
- os_name: windows-aarch64 | ||
os: windows-latest | ||
target: aarch64-pc-windows-msvc | ||
bin: zippo-windows-aarch64.exe | ||
skip_tests: true | ||
- os_name: windows-i686 | ||
os: windows-latest | ||
target: i686-pc-windows-msvc | ||
bin: zippo-windows-i686.exe | ||
skip_tests: true | ||
- os_name: windows-x86_64 | ||
os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
bin: zippo-windows-x86_64.exe | ||
- os_name: macOS-x86_64 | ||
os: macOS-latest | ||
target: x86_64-apple-darwin | ||
bin: zippo-darwin-x86_64 | ||
- os_name: macOS-aarch64 | ||
os: macOS-latest | ||
target: aarch64-apple-darwin | ||
bin: zippo-darwin-aarch64 | ||
skip_tests: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache cargo & target directories | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install musl-tools on linux | ||
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | ||
if: contains(matrix.platform.target, 'musl') | ||
- name: Build binary | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: "build" | ||
target: ${{ matrix.platform.target }} | ||
toolchain: nightly | ||
args: "--locked --release" | ||
strip: true | ||
- name: Package as archive | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.platform.target }}/release | ||
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then | ||
mv zippo.exe ${{ matrix.platform.bin }} | ||
else | ||
mv zippo ${{ matrix.platform.bin }} | ||
fi | ||
cd - | ||
- name: Publish GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: "target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}" |
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,2 @@ | ||
target | ||
.idea |
Oops, something went wrong.