Skip to content

LICENSE and release' #1

LICENSE and release'

LICENSE and release' #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
build-release:
needs: create-release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: program-linux-x86_64.tar.gz
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
artifact_name: program-linux-aarch64.tar.gz
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: program-darwin-x86_64.tar.gz
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: program-darwin-aarch64.tar.gz
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}
- name: Package
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../${{ matrix.artifact_name }} your-program
cd ../../..
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./${{ matrix.artifact_name }}
asset_name: ${{ matrix.artifact_name }}
asset_content_type: application/gzip