Skip to content

chore: Release {{crate_name}} version {{version}} #2

chore: Release {{crate_name}} version {{version}}

chore: Release {{crate_name}} version {{version}} #2

Workflow file for this run

name: Build and deploy sss_code
permissions:
contents: write
env:
APP_NAME: ssss_code
on:
push:
paths-ignore:
- ".github/workflows/**.yml"
- "**/Makefile.toml"
- "release.toml"
- "LICENS**"
- "**/README.md"
tags:
- "**"
jobs:
ci:
uses: ./.github/workflows/ci.yml
build_native:
needs: ci
runs-on: ${{ matrix.os }}
outputs:
APP_NAME: ${{env.APP_NAME}}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: x86_64-unknown-linux-gnu.tar.gz
channel: linux
- target: x86_64-apple-darwin
os: macos-latest
name: x86_64-apple-darwin.tar.gz
channel: mac
- target: x86_64-pc-windows-msvc
os: windows-latest
name: x86_64-pc-windows-msvc.zip
channel: win
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
- name: Load .env file
uses: xom9ikk/dotenv@v2
with:
load-mode: skip
- name: Build Release
uses: actions-rs/[email protected]
with:
command: build
args: --release --workspace -p ${{ env.APP_NAME }} --target ${{ matrix.target }}
- name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest'
run: |
mv target/${{ matrix.target }}/release/${{ env.APP_NAME }}.exe ${{ env.APP_NAME }}.exe
7z a ${{ matrix.name }} ${{ env.APP_NAME }}.exe
mv ${{ matrix.name }} ${{ env.APP_NAME }}-${{ matrix.name }}
- name: Post Build | Prepare artifacts [-nix]
if: matrix.os != 'windows-latest'
run: |
mv target/${{ matrix.target }}/release/${{ env.APP_NAME }} ${{ env.APP_NAME }}
tar cvzf ${{ matrix.name }} ${{ env.APP_NAME }}
mv ${{ matrix.name }} ${{ env.APP_NAME }}-${{ matrix.name }}
- name: Post Build | Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.APP_NAME }}-${{ matrix.name }}
path: ${{ env.APP_NAME }}-${{ matrix.name }}
- name: Release | Upload
uses: softprops/action-gh-release@v1
with:
files: ${{ env.APP_NAME }}-${{ matrix.name }}
prerelease: ${{ contains(github.ref_name, 'a') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}