Skip to content

v0.12.0

v0.12.0 #36

Workflow file for this run

# .github/workflows/release.yml
name: CD # Continuous Deployment
permissions:
contents: write
on:
release:
types: [published]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
defaults:
run:
shell: bash
jobs:
# https://release-plz.ieni.dev/docs/extra/releasing-binaries
upload-assets:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
- target: aarch64-unknown-linux-musl
os: ubuntu-22.04
- target: aarch64-apple-darwin
os: macos-12
- target: aarch64-pc-windows-msvc
os: windows-2022
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
- target: x86_64-unknown-linux-musl
os: ubuntu-22.04
- target: x86_64-apple-darwin
os: macos-12
- target: x86_64-pc-windows-msvc
os: windows-2022
- target: x86_64-unknown-freebsd
os: ubuntu-22.04
- target: universal-apple-darwin
os: macos-12
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: startsWith(matrix.os, 'ubuntu') && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: contains(matrix.target, '-musl')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: atac
target: ${{ matrix.target }}
archive: $bin-$tag-$target # https://github.com/taiki-e/upload-rust-binary-action?tab=readme-ov-file#example-workflow-customize-archive-name
tar: all
zip: windows
token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/marketplace/actions/homebrew-releaser
homebrew-releaser:
needs: upload-assets
runs-on: ubuntu-latest
name: homebrew-releaser
if: ${{ false }} # Temporally disabled
steps:
- name: Release my project to my Homebrew tap
uses: Justintime50/homebrew-releaser@v1
with:
# The name of the homebrew tap to publish your formula to as it appears on GitHub.
# Required - strings
homebrew_owner: julien-cpsn
homebrew_tap: homebrew-atac
# The name of the folder in your homebrew tap where formula will be committed to.
# Default is shown - string
formula_folder: Formula
# The Personal Access Token (saved as a repo secret) that has `repo` permissions for the repo running the action AND Homebrew tap you want to release to.
# Required - string
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# Git author info used to commit to the homebrew tap.
# Defaults are shown - strings
commit_owner: homebrew-releaser
commit_email: [email protected]
# Custom dependencies in case other formulas are needed to build the current one.
# Optional - multiline string
#depends_on: |
# "bash" => :build
# Custom install command for your formula.
# Required - string
install: 'bin.install "atac"'
# Custom test command for your formula so you can run `brew test`.
# Optional - string
#test: 'assert_match("my script output", shell_output("my-script-command"))'
# Allows you to set a custom download strategy. Note that you'll need
# to implement the strategy and add it to your tap repository.
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
# Optional - string
#download_strategy: CurlDownloadStrategy
# Allows you to add a custom require_relative at the top of the formula template.
# Optional - string
#custom_require: custom_download_strategy
# Override the automatically detected version of a formula with an explicit value.
# This option should only be used if Homebrew cannot automatically detect the version when generating
# the Homebrew formula. Including this when not necessary could lead to uninstallable formula that may
# not pass `brew audit` due to mismatched or redundant version strings
# Optional - string
version: '${{ github.ref_name }}'
# Adds URL and checksum targets for different OS and architecture pairs. Using this option assumes
# a tar archive exists on your GitHub repo with the following URL pattern (this cannot be customized):
# https://github.com/{GITHUB_OWNER}/{REPO_NAME}/releases/download/{TAG}/{REPO_NAME}-{VERSION}-{OPERATING_SYSTEM}-{ARCHITECTURE}.tar.gz'
# Darwin AMD pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-darwin-amd64.tar.gz
# Linux ARM pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-linux-arm64.tar.gz
# Optional - booleans
target_darwin_amd64: true
target_darwin_arm64: true
target_linux_amd64: true
target_linux_arm64: true
# Update your homebrew tap's README with a table of all projects in the tap.
# This is done by pulling the information from all your formula.rb files - eg:
#
# | Project | Description | Install |
# | ------------------------------------------ | ------------ | ------------------------ |
# | [formula_1](https://github.com/user/repo1) | helpful text | `brew install formula_1` |
# | [formula_2](https://github.com/user/repo2) | helpful text | `brew install formula_2` |
# | [formula_3](https://github.com/user/repo3) | helpful text | `brew install formula_3` |
#
# Place the following in your README or wrap your project's table in these comment tags:
# <!-- project_table_start -->
# TABLE HERE
# <!-- project_table_end -->
#
# Finally, mark `update_readme_table` as `true` in your GitHub Action config and we'll do the work of building a custom table for you.
# Default is `false` - boolean
update_readme_table: true
# Skips committing the generated formula to a homebrew tap (useful for local testing).
# Default is shown - boolean
#skip_commit: false
# Logs debugging info to console.
# Default is shown - boolean
#debug: false