release: v1.1.0 #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
# don't change `Linux` or `x86_64` to avoid breaking the | |
# install script because it relies on the `uname` outputs | |
- release_for: Linux-x86_64 | |
build_on: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
args: "--locked --release" | |
# don't change `Linux` or `arm64` to avoid breaking the | |
# install script because it relies on the `uname` outputs | |
- release_for: Linux-arm64 | |
build_on: ubuntu-latest | |
target: "armv7-unknown-linux-gnueabihf" | |
args: "--locked --release" | |
- release_for: Windows-x86_64 | |
build_on: windows-latest | |
target: x86_64-pc-windows-msvc | |
args: "--locked --release" | |
ext: .exe | |
# don't change `Darwin` or `x86_64` to avoid breaking the | |
# install script because it relies on the `uname` outputs | |
- release_for: Darwin-x86_64 | |
build_on: macOS-latest | |
target: x86_64-apple-darwin | |
args: "--locked --release" | |
# don't change `Darwin` or `arm64` to avoid breaking the | |
# install script because it relies on the `uname` outputs | |
- release_for: Darwin-arm64 | |
build_on: macOS-latest | |
target: aarch64-apple-darwin | |
args: "--locked --release" | |
runs-on: ${{ matrix.build_on }} | |
steps: | |
- name: install deps [MacOS] | |
if: matrix.build_on == 'macOS-latest' | |
run: | | |
brew install [email protected] | |
- name: checkout repository | |
uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "release" | |
- name: build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
target: ${{ matrix.target }} | |
args: ${{ matrix.args }} | |
strip: true | |
- name: tar binaries | |
run: | | |
tar -czvf dmtrctl-${{ matrix.release_for }}.tar.gz -C target/${{ matrix.target }}/release/ dmtrctl${{ matrix.ext }} | |
- name: upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: dmtrctl-${{ matrix.release_for }}.tar.gz | |
release: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.16" | |
- name: download artifacts | |
id: "download" | |
uses: actions/download-artifact@v3 | |
- name: set release notes | |
run: | | |
go install github.com/git-chglog/git-chglog/cmd/[email protected] | |
git-chglog -c .github/chglog/release.yml $(git describe --tags) > RELEASE.md | |
- name: create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: binaries/* | |
body_path: RELEASE.md | |
draft: true |