Skip to content

Commit

Permalink
Add build and release workflow based on git version tags
Browse files Browse the repository at this point in the history
Remove copy of non-existant file
  • Loading branch information
JamyGolden committed Feb 15, 2024
1 parent c815d30 commit d2b7824
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit d2b7824

Please sign in to comment.