Skip to content

Release 2.7.2

Release 2.7.2 #16

Workflow file for this run

name: Release on tag
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: moonrepo/setup-rust@v0
with:
cache-target: release
bins: cargo-workspaces
- name: Build
run: cargo build --release
- name: Publish package
run: cargo workspaces publish --from-git
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Create a draft release
id: create_release
run: |
NEW_VERSION=$(cargo workspaces ls --json | jq -r '.[] | select(.name == "codspeed") | .version')
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d
echo "upload_url=$(gh release view v$NEW_VERSION --json uploadUrl | jq -r '.uploadUrl')" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
build-upload-binaries:
needs: publish
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: aarch64-unknown-linux-gnu
cross: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v0
with:
bins: cross
- run: ${{ matrix.cross && 'cross' || 'cargo' }} build --locked --release --features vendored-openssl --bin cargo-codspeed --target ${{ matrix.target }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.publish.outputs.upload_url }}
asset_path: ./target/${{ matrix.target }}/release/cargo-codspeed
asset_name: cargo-codspeed-${{ matrix.target }}
asset_content_type: application/octet-stream