Skip to content

v0.2.8

v0.2.8 #13

Workflow file for this run

name: release
on:
release:
types: [created]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
MACOSX_DEPLOYMENT_TARGET: 10.7
jobs:
build:
name: build release
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: adrs-x86_64-unknown-linux-gnu.tar.gz
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
name: adrs-x86_64-unknown-linux-musl.tar.gz
- target: i686-unknown-linux-musl
os: ubuntu-latest
name: adrs-i686-unknown-linux-musl.tar.gz
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
name: adrs-aarch64-unknown-linux-musl.tar.gz
- target: x86_64-apple-darwin
os: macOS-11
name: adrs-x86_64-apple-darwin.tar.gz
- target: aarch64-apple-darwin
os: macOS-11
name: adrs-aarch64-apple-darwin.tar.gz
- target: x86_64-unknown-freebsd
os: ubuntu-latest
name: adrs-x86_64-unknown-freebsd.tar.gz
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: checkout
uses: actions/checkout@v4
- name: rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: install cross
if: matrix.os == 'ubuntu-latest'
uses: taiki-e/install-action@cross
- name: build
if: matrix.os != 'ubuntu-latest'
run: cargo build --release --locked --target ${{ matrix.target }}
- name: build (cross)
if: matrix.os == 'ubuntu-latest'
run: cross build --release --locked --target ${{ matrix.target }}
- name: ls
run: ls -l target/${{ matrix.target }}/release
- name: prepare artifacts
run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ matrix.name }} adrs
cd -
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
upload_artifacts:
name: add artifacts to release
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: artifacts
uses: actions/download-artifact@v4
- name: checksums
run: for file in adrs-*/adrs-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
# - name: publish
# run: gh release edit ${{ github.ref_name }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: add artifacts to release
uses: softprops/action-gh-release@v1
with:
files: adrs-*/adrs-*
tag_name: ${{ github.ref_name }}
cargo_publish:
name: Publish Cargo Package
runs-on: ubuntu-latest
needs: [upload_artifacts]
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
- name: Build | Publish
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
update_brew_formula:
name: Update Brew Formula
runs-on: ubuntu-latest
needs: [upload_artifacts]
steps:
- uses: mislav/bump-homebrew-formula-action@v3.1
with:
formula-name: adrs
formula-path: Formula/adrs.rb
base-branch: main
tag-name: ${{ github.ref_name }}
homebrew-tap: joshrotenberg/homebrew-brew
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}