Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Testing

Testing #38

Workflow file for this run

name: Release 📦
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: linux-arm64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
bin: aws-sso-auth
name: aws-sso-auth-linux-arm64.tar.gz
command: build
- release_for: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: aws-sso-auth
name: aws-sso-auth-linux-x86_64.tar.gz
command: build
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: aws-sso-auth
name: aws-sso-auth-darwin-x86_64.tar.gz
command: build
- release_for: macOS-arm64
os: macOS-latest
target: aarch64-apple-darwin
bin: aws-sso-auth
name: aws-sso-auth-darwin-arm64.tar.gz
command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--release"
strip: true
# - name: Setup Rust
# uses: dtolnay/rust-toolchain@v1
# with:
# toolchain: stable
#
# - name: Checkout Repository
# uses: actions/checkout@v3
#
# - name: Install dependencies
# run: |
# sudo dpkg --add-architecture arm64
# sudo apt-get update
# sudo apt-get install -y libc6:arm64 qemu-user-static musl-tools
#
# - name: Install cross
# run: cargo install cross
#
# - name: Build for ARM64
# run: cross build --target aarch64-apple-darwin --release
# - name: Setup
# if: matrix.os == 'ubuntu-latest'
# run: |
# rustup target add aarch64-unknown-linux-gnu
# rustup target add x86_64-unknown-linux-musl
# sudo apt-get update && sudo apt-get install -y qemu-user-static musl-tools
# - name: Build for Linux
# if: matrix.os == 'ubuntu-latest'
# run: |
# make release-linux
# - name: Build for macOS
# if: matrix.os == 'macOS-latest'
# run: make release-mac
- name: Release
uses: softprops/action-gh-release@v1
with:
body: '[Changelog](https://github.com/containerscrew/aws-sso-auth/blob/main/CHANGELOG.md)'
files: "*.tar.gz\n*.rpm"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}