-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build and release workflow based on git version tags
Remove copy of non-existant file
- Loading branch information
1 parent
c815d30
commit d2b7824
Showing
1 changed file
with
58 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,58 @@ | ||
name: Rust Multi-Platform Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
workflow_dispatch: | ||
inputs: | ||
tagName: | ||
description: "Tag Name to Build" | ||
required: true | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: ubuntu-latest | ||
target: i686-unknown-linux-gnu | ||
- os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
|
||
- name: Build Release | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Archive Production Artifacts | ||
run: | | ||
zip -r tinty-${{ matrix.target }}-${{ github.ref_name }}.zip ./target/${{ matrix.target }}/release/ | ||
shell: bash | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: tinty-${{ matrix.target }}-${{ github.ref_name }} | ||
path: tinty-${{ matrix.target }}-${{ github.ref_name }}.zip | ||
|
||
- name: Release | ||
if: startsWith(github.ref, "refs/tags/") | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: tinty-*-${{ github.ref_name }}.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |